subscribe via RSS
How to Install Global npm Packages in Your Home Dir
If you do not use nvm, it may be annoying that each time
you install a global npm package, it asks for superuser rights. It is fairly easy to solve
this problem by adding a small configuration to your .npmrc file:
prefix=~/.npm-packagesNow all your global packages will be placed in .npm-packages folder. You need to create this
folder manually.
And then add your local npm bin folder to your PATH. I have this line in my .bashrc:
export PATH="$PATH:$HOME/.npm-packages/bin"I hope this helps someone.
Vaidas Pilkauskas