Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm command not found after restart

The npm command keeps becoming unrecognised after a computer restart:

-bash: npm: command not found

The node command still works fine, it's just npm that's not working. I have to reinstall Node.js from the main site to get it working again.

~/bin is added to my $PATH in my .bash_profile with:

export PATH="$HOME/bin:$PATH"

Edit: I'm also using the full mathiasbynens/dotfiles which manages its own version, I wonder if there's a conflict here.

like image 673
AlecRust Avatar asked Nov 13 '13 11:11

AlecRust


1 Answers

According to nvm readme file, try to run this once:

nvm alias default stable

This will set a default Node version to be used in any new shell.

like image 156
Anvaka Avatar answered Sep 28 '22 01:09

Anvaka