Cloudflare DevelopersCD
Cloudflare Developers4y ago
21 replies
honzabit

hey I m using vitest for testing and

hey! I'm using vitest for testing, and "suddenly" (in quotes as I can't figure out how I broke it) I get the following error:
TypeError: Cannot set property crypto of #<Object> which has only a getter
 ❯ Object.setup node_modules/vitest-environment-miniflare/src/index.ts:80:11
 ❯ Module.withEnv node_modules/vitest/dist/chunk-runtime-setup.667a5719.js:888:15
    886|     files.map(async (fsPath) => {
    887|       getWorkerState().moduleCache.delete(fsPath);
    888|       await import(fsPath);
       |               ^
    889|     })
    890|   );
 ❯ run node_modules/vitest/dist/entry.js:91:7
 ❯ node_modules/tinypool/dist/esm/worker.js:109:20
Was this page helpful?