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 having some problems running isolated-vm inside a vitest test after upgrading to node 20.
With node 18.x it works well, after switching to node v20 I have a segmentation fault[1] 2778 segmentation fault pnpm run test
Quite sure this is releated with --no-node-snapshot but it seems it is incompatible with vitest.
I've read the docs of vitest and it seems is not possible to de-opt from vitest js vm.
This is what happens when I run vitest with NODE_OPTIONS=--no-node-snapshot
Error: Initiated Worker with invalid NODE_OPTIONS env variable: --no-node-snapshot is not allowed in NODE_OPTIONS
❯ new Worker node:internal/worker:225:13
❯ ThreadWorker.initialize ../../node_modules/.pnpm/[email protected]/node_modules/tinypool/dist/esm/index.js:139:19
❯ ThreadPool._addNewWorker ../../node_modules/.pnpm/[email protected]/node_modules/tinypool/dist/esm/index.js:678:12
❯ ThreadPool._ensureMinimumWorkers ../../node_modules/.pnpm/[email protected]/node_modules/tinypool/dist/esm/index.js:663:12
❯ new ThreadPool ../../node_modules/.pnpm/[email protected]/node_modules/tinypool/dist/esm/index.js:648:10
❯ new Tinypool ../../node_modules/.pnpm/[email protected]/node_modules/tinypool/dist/esm/index.js:950:31
❯ createThreadsPool ../../node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vitest/dist/vendor/cac.qnW6GNL2.js:8776:16
❯ threads ../../node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vitest/dist/vendor/cac.qnW6GNL2.js:9425:22
❯ ../../node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vitest/dist/vendor/cac.qnW6GNL2.js:9450:39
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'ERR_WORKER_INVALID_EXEC_ARGV' }
The text was updated successfully, but these errors were encountered:
This is a bug in vitest. They should not be naively passing NODE_OPTIONS into Worker like this. If you can somehow delete process.env.NODE_OPTIONS then it will probably work. Or you can run vitest via: node --no-node-snapshot node_modules/vitest/dist/cli-wrapper.js. But I think you might run into more problems.
I'm having some problems running isolated-vm inside a vitest test after upgrading to node 20.
With node 18.x it works well, after switching to node v20 I have a segmentation fault
[1] 2778 segmentation fault pnpm run test
Quite sure this is releated with
--no-node-snapshot
but it seems it is incompatible with vitest.I've read the docs of vitest and it seems is not possible to de-opt from vitest js vm.
This is what happens when I run vitest with
NODE_OPTIONS=--no-node-snapshot
The text was updated successfully, but these errors were encountered: