dimarts, 25 de juliol del 2017



npm change global path to prevent the sudo use


change the default global path. Ie the -g option under npm -g install


 cd ~ && mkdir .node_modules_global
 npm config set prefix=$HOME/.node_modules_global

echo 'export PATH=$PATH:$HOME/.node_modules_global/bin'  >> ~/.bash_profile

Source https://docs.npmjs.com/getting-started/fixing-npm-permissions

 
to refreh source .bash_profile to avoid logoff and login. 

Then is easy install ng client and use it

npm install -g @angular/cli


Cap comentari:

Publica un comentari a l'entrada