Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Terminal not recognizing npm and node, installed with nvm (on MAC)

I have installed nodejs and npm using NVM on mac, Whenever i open new terminal, it keep forgetting npm and node. I am using mac

I am facing this error

npm not found

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

npm -v

I am expecting the npm version from this command

>Solution :

First check if nvm path is added in .zshrc

Add this to your .zshrc if not already added

export PATH=$HOME/bin:/usr/local/bin:$PATH

Also load and add path on NVM

    export NVM_DIR="/Users/{USER NAME}/Library/Application {PATH of NVM}"

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

Then add nvm alias

nvm alias default stable
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading