Tuesday, 11 June 2019

VS Code automatic npm build fails with "npm command not found"

According to docs it is supposed to work. When I press Ctrl-Shift-B, I do get npm: build as an option, which if I run I get npm command not found in the terminal. However, manually running npm run build works.

I am using nvm. Some relevant outputs:

 ~  which node
/home/gt/.nvm/versions/node/v10.15.3/bin/node
 ~  which npm 
/home/gt/.nvm/versions/node/v10.15.3/bin/npm
 ~  echo $NODE_PATH
/home/gt/.nvm/versions/node/v10.15.3/bin/node

What could be the reason for this? And how to fix it?



from VS Code automatic npm build fails with "npm command not found"

No comments:

Post a Comment