linux - Cannot run npm as root -



linux - Cannot run npm as root -

i trying grunt , running, next this, , cannot much farther first step. able type

npm install -g grunt-cli

but command fails, giving me advice

please seek running command 1 time again root/administrator

ok... seek run same command sudo

sudo npm install -g grunt-cli

and error

sudo: npm: command not found

which me, sort of weird, because shell able recognize npm without "sudo" thrown in front. how install globally/get sudo recognize npm valid program?

i found out reply help of co-worker. basically, there file did not have permissions on, found looking @ error log. sudo'd chmod'd file code of 777, , ran npm install command again, , found worked. thought paste reply in case helps anyone.

linux node.js install npm sudo

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -