Wednesday, August 14, 2019

npm install -g without sudo

On my machine, ~/.npmrc file is not existing. So I created one, and then add the following:


And in ~/.bash_profile (which is also not existing on my machine, so I created one), I added this line:

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

Restarted terminal, npm install -g now works even without the sudo

Followed these steps:

No comments:

Post a Comment