-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed as duplicate of#7324
Labels
awaiting Cloudflare responseAwaiting response from workers-sdk maintainer teamAwaiting response from workers-sdk maintainer teambugSomething that isn't workingSomething that isn't working
Description
Which Cloudflare product(s) does this pertain to?
Workers Vitest Integration
What versions are you using?
@cloudflare/vitest-pool-workers 0.6.16
What operating system and version are you using?
Mac 15.3.1 (24D70)
Please provide a link to a minimal reproduction
https://github.com/timkelty/cloudflare-workers-node-constants
Describe the Bug
When running tests, importing a dependency that imports from constants (example) will result in:
FAIL test/index.spec.ts [ test/index.spec.ts ]
Error: No such module "node:constants".
❯ Users/timkelty/Desktop/node-constants/node_modules/http-message-signatures/lib/algorithm/index.js?mf_vitest_no_cjs_esm_shim:5:21
❯ Users/timkelty/Desktop/node-constants/node_modules/http-message-signatures/lib/index.js?mf_vitest_no_cjs_esm_shim:30:14
- I've tried Depency pre-building without any luck
- This only happens during
vitest,wrangler deployworks fine.
Please provide any relevant error logs
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
awaiting Cloudflare responseAwaiting response from workers-sdk maintainer teamAwaiting response from workers-sdk maintainer teambugSomething that isn't workingSomething that isn't working
Type
Projects
Status
Done