The question title is self-expanatory, but just to make more clear...
With npm install -g
I can install anything globaly, what turns it in an application command. But, in GNU/Linux, this requires root access, so, what if I want install something as a command, but only for the current logged user, and not needing root access?
Is that possible?
After @brian-glaz tip I managed to do like this:
Create a ~/.npmrc
file with the folowing content
prefix=~/
Notice that it must be lowercase prefix
.
You can check the paths as follows:
paulo.goncalves@paulogoncalves:~$ npm -g root
/home/paulo.goncalves/lib/node_modules
paulo.goncalves@paulogoncalves:~$ npm -g bin
/home/paulo.goncalves/bin
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments