Vitest not accessing the correct version of node; startup fails #482
-
I just installed the Vitest extension, and have been trying to fix the following error I get on startup from Vitest:
I use Volta to manage node, and as far as I can tell, inside the VSCode terminal I have a supported version of node:
So I'm not entirely sure why it's trying to use an older version, or where in the configuration I should go to correct it. Has anyone run into this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The environment for the terminal in VSCode and the one Vitest uses aren't always the same. To fix this you can either:
Note I don't use Volta so these commands are taken from the docs, refer there if they are incorrect: |
Beta Was this translation helpful? Give feedback.
The environment for the terminal in VSCode and the one Vitest uses aren't always the same. To fix this you can either:
volta install node@20
volta which node
and then set that to the VSCode settingvitest.nodeExecutable
Note I don't use Volta so these commands are taken from the docs, refer there if they are incorrect: