Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to run test with node 16.1.0 #2251

Closed
6 tasks done
znagadeon opened this issue Nov 1, 2022 · 4 comments · Fixed by #2267
Closed
6 tasks done

Fail to run test with node 16.1.0 #2251

znagadeon opened this issue Nov 1, 2022 · 4 comments · Fixed by #2267

Comments

@znagadeon
Copy link

Describe the bug

It throws unhandled error.

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error: Initiated Worker with invalid execArgv flags: -C
 ❯ new NodeError node:internal/errors:363:5
 ❯ new Worker node:internal/worker:200:13
 ❯ ThreadPool._addNewWorker node_modules/tinypool/dist/esm/index.js:500:20
 ❯ ThreadPool._ensureMinimumWorkers node_modules/tinypool/dist/esm/index.js:485:12
 ❯ new ThreadPool node_modules/tinypool/dist/esm/index.js:475:10
 ❯ new Tinypool node_modules/tinypool/dist/esm/index.js:739:31
 ❯ createPool node_modules/vitest/dist/chunk-vite-node-externalize.e66d46f6.js:7167:16
 ❯ node_modules/vitest/dist/chunk-vite-node-externalize.e66d46f6.js:9998:21
 ❯ Vitest.runFiles node_modules/vitest/dist/chunk-vite-node-externalize.e66d46f6.js:10015:7
 ❯ Vitest.start node_modules/vitest/dist/chunk-vite-node-externalize.e66d46f6.js:9932:5

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: {
  "code": "ERR_WORKER_INVALID_EXEC_ARGV",
}

Reproduction

I downloaded stackblitz sample vitest project and run it in node 16.1.0 without any change.

https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/basic?initialPath=__vitest__

System Info

System:
  OS: macOS 12.4
  CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Memory: 4.38 GB / 32.00 GB
  Shell: 5.8.1 - /bin/zsh
Binaries:
  Node: 16.1.0 - ~/.asdf/installs/nodejs/16.1.0/bin/node
  Yarn: 1.22.17 - ~/.asdf/installs/nodejs/16.1.0/.npm/bin/yarn
  npm: 7.11.2 - ~/.asdf/plugins/nodejs/shims/npm
Browsers:
  Chrome: 107.0.5304.87
  Safari: 15.5
npmPackages:
  vite: latest => 3.2.2
  vitest: latest => 0.24.4

Used Package Manager

npm

Validations

@sheremet-va
Copy link
Member

Update your Node version to latest Node 16.x at least

@znagadeon
Copy link
Author

But the document says it requires node >= v14 to use vitest v0.24.4. I think one of them should be fixed.

By the way, I circumvented this issue by downgrading vitest to 0.24.3 :)

@sheremet-va
Copy link
Member

Yes, Vitest should support it. I just told how to fix it in the meantime 😄

@sheremet-va sheremet-va added the bug label Nov 1, 2022
@danez
Copy link
Contributor

danez commented Nov 3, 2022

I have the exact same problem with Node.js 14.16.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants