I am running node.js version 18 using nvm on my Mac. node -v in the OSX terminal as well as in the VSCode terminal prints out the correct version (both zsh).
However, if I run node -v as a npm script through the VSCode menu (Terminal > Run Task > "node-version") it prints out an older version of node (v16 in this case).
I can't find any setting for this. Does anybody know where I can configure the currently wrong node version?
Thanks, Gerry
I got it running. There were some old node bins under /usr/local/bin which were picked up by VSCode. After running
rm -rf /usr/local/bin/npm
rm -rf /usr/local/bin/node
and restart VSCode the node version is correct.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With