Npm command not found in visual studio code

By default, Visual Studio Code runs shell commands like npm in a loginless shell. If you installed NVM, Visual Studio Code may have no indication where to find npm to run it.

Put the following lines are in .bash_profile: (Note: Not .bashrc.)

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

Add this setting to settings.json:

"terminal.integrated.shellArgs.linux": ["-l"]

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)