Skip to content

New version breaks in cloudflare vitests: No such module "node:process" #3583

@astanciu

Description

@astanciu

When running vitests for cloudflare workers, via vitest-pool-workers, I started getting these:

Error: No such module "node:process".
 ❯ ../../Users/user/owlie/node_modules/.pnpm/pg-connection-string@2.10.0/node_modules/pg-connection-string/index.js?mf_vitest_no_cjs_esm_shim:3:25
 ❯ ../../Users/user/owlie/node_modules/.pnpm/pg@8.17.1/node_modules/pg/lib/connection-parameters.js?mf_vitest_no_cjs_esm_shim:7:15
 ❯ ../../Users/user/owlie/node_modules/.pnpm/pg@8.17.1/node_modules/pg/lib/client.js?mf_vitest_no_cjs_esm_shim:9:30
 ❯ ../../Users/user/owlie/node_modules/.pnpm/pg@8.17.1/node_modules/pg/lib/index.js?mf_vitest_no_cjs_esm_shim:3:16

I jumped from v8.16.3 to v8.17.1 this also bumped pg-connection-string from 2.9.1 → 2.10.0
I compared local index.js between 2.9.1 and 2.10.0, and the new node:process import + SSL warning helper is the only substantive change (and it explains the failure).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions