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:20vitest-environment-miniflare before? Have you upgraded any packages recently?rm -rf node_modules and npm i before testing it) .. I have no idea what I broke and how console.log() in node_modules to understand where exactly it breaks, and got inside getGlobalScope() in the shared-test-environment package, where it was failing before await this.#initPromise;rm -rf node_modules, did you also rm package-lock.json?miniflare 2.10.0 + vitest-environment-miniflare 2.10.0 + vitest 0.24.0node version are you using?v19.1.016? Haven't tested Miniflare 2 on Node 19 yet. I'd recommend https://volta.sh/ if you're not already using a Node version manager.vitest-environment-miniflarerm -rf node_modulesrm -rf node_modulesnpm igetGlobalScope()shared-test-environmentawait this.#initPromise;rm package-lock.jsonminiflare 2.10.0vitest-environment-miniflare 2.10.0vitest 0.24.0nodev19.1.016Test Files 14 passed (14)
Tests 79 passed (79)