vitest-dev / vscode

VS Code extension for Vitest
https://vitest.dev/vscode
MIT License
764 stars 86 forks source link

Unable to find 'node' executable #525

Open budarin opened 2 weeks ago

budarin commented 2 weeks ago

Describe the bug

I am using nvm to install nodejs. I get this error while opening VS Code.

Why don't you use the where node command, which gives the correct path to the executable file node.exe?

Reproduction

no link

Output

[INFO 3:04:37 PM] [v1.6.6] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[Error 3:04:39 PM] Unable to find 'node' executable.
Make sure to have Node.js installed and available in your PATH.
....


### Version

v1.6.6

### Validations

- [X] Check that you are using the latest version of the extension
- [X] Check that there isn't [already an issue](https://github.com/vitest-dev/vscode/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitest-dev/vscode/discussions) or join our [Discord Chat Server](https://chat.vitest.dev).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
philsherry commented 1 week ago

I’ve started running into this as well. I’m using asdf for my node install and it’s at the front of my $PATH. (The Brew’d node is a dependency for other things.)

Here’s the output from my VS Code CLI after the error had shown, and once all extensions had loaded:

❯ where node
/Users/philsherry/.local/share/asdf/shims/node
/opt/homebrew/bin/node
❯ which node
/Users/philsherry/.local/share/asdf/shims/node
❯ which -a node
/Users/philsherry/.local/share/asdf/shims/node
/opt/homebrew/bin/node
❯ command -v node
/Users/philsherry/.local/share/asdf/shims/node