I just updated node (through the nodejs.org package installer) and now npm
won't work.
npm: command not found
Any idea what's going on?
The npm command not found error js server, which you can download from the nodejs.org website. Once you downloaded and installed Node. js, open the terminal and run the npm -v command. Once you see the npm version, you should be able to run the npm install command again.
The Npm command not found error can appear when you install or upgrade npm. On Windows, the cause of this error could be that a PATH or system variable is not correctly set. The error can also occur if you do not have npm or Node. js installed, have an outdated version, or have permission issues.
I was hung up on this too. I installed node via nvm and could not run npm or node. I had to run nvm use 0.10.10
then which node
and which npm
worked again.
if you have installed npm
via nvm
you might want to add nvm use <version>
to your .bashrc
file so that you'll have npm
always available on any shell you open. You just need to remember to update it whenever you update npm, or use stable
.
It could be a permission issue as well. If so you need to run this: sudo chown -R $USER /usr/local
This worked for me
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