Open ludusrusso opened 4 months ago
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