You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to test my worker with miniflare and so adding next code to my index.spec.ts
import { Miniflare } from 'miniflare';
const mf = new Miniflare({
modules: true,
scriptPath: './src/index.ts',
r2Buckets: ['R2_BUCKET'],
});
When running it i'm getting an error:
Using vars defined in .dev.vars
[vpw:inf] Starting isolated runtimes for vitest.config.mts...
[mf:wrn] The latest compatibility date supported by the installed Cloudflare Workers Runtime is "2024-12-05",
but you've requested "2024-12-16". Falling back to "2024-12-05"...
workerd/server/server.c++:3052: error: Fallback service failed to fetch module; payload = ; spec = /?specifier=node%3Aos&referrer=%2FUsers%2Frush%2FProjects%2Fproj%2Fnode_modules%2Fminiflare%2Fdist%2Fsrc%2Findex.js%3Fmf_vitest_no_cjs_esm_shim&rawSpecifier=node%3Aos
❯ test/index.spec.ts (0)
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
FAIL test/index.spec.ts [ test/index.spec.ts ]
Error: No such module "node:os".
❯ Users/rush/Projects/proj/node_modules/miniflare/dist/src/index.js?mf_vitest_no_cjs_esm_shim:2623:26
Node: v20.17.0
Miniflare: 3.20241205.0
The text was updated successfully, but these errors were encountered:
@hotrush thanks very much for reporting this! Would you be able to provide us with a minimal reproduction? I can't reproduce this locally, and I'm wondering how this node:os dependency is creeping into the code.
I'm trying to test my worker with miniflare and so adding next code to my
index.spec.ts
When running it i'm getting an error:
Node: v20.17.0
Miniflare: 3.20241205.0
The text was updated successfully, but these errors were encountered: