1

If I open a terminal window at a folder and type: node -v I get: v12.16.2

If I do the same from my integrated terminal in the same folder in VS code: node -v I get: node: Command not found.

This worked fine until recently (presumably a VS code update). Can anyone help?

2 Answers2

1

The comment response to the question on this page: Set global $PATH environment variable in VS Code

... told me that VS Code reads .tcshrc (or equivalent for other shells). So I added set path=($path /usr/local/bin) to .tcshrc and restarted VS code.

https://superuser.com/questions/224974/how-do-i-add-a-location-to-my-path-in-unix

0

Add node to your path and then you can use it anywhere, you can follow this https://www.architectryan.com/2012/10/02/add-to-the-path-on-mac-os-x-mountain-lion/

Dani
  • 745
  • 7
  • 12
  • Thanks Dani, but /usr/local/bin is already in the path (and that's where node is located). The problem lies with VS Code: Terminal: `echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:.... etc...` VS Code: `echo $PATH /usr/bin:/bin:/usr/sbin:/sbin` How can I set the path in VS Code? – user1677275 Jul 14 '21 at 09:56
  • 1
    I've since read that VSCode will read from .tcshrc (or equivalent for other shells) so I added set path=($path /usr/local/bin) to .tchsrc and now working as it should. Thanks for your help. – user1677275 Jul 14 '21 at 10:08