Skip to content

Vitest not accessing the correct version of node; startup fails #482

Answered by BenShelton
s-gohel asked this question in Q&A
Discussion options

You must be logged in to vote

The environment for the terminal in VSCode and the one Vitest uses aren't always the same. To fix this you can either:

  1. Set the default version of node for your system to a compatible version with volta install node@20
  2. Find the path to the actual binary with volta which node and then set that to the VSCode setting vitest.nodeExecutable

Note I don't use Volta so these commands are taken from the docs, refer there if they are incorrect:

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by s-gohel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants