node.js - NPM permission error while installing -


i trying install yeoman on server reason keep getting permission denied error.

$npm install -g yo /root/.node/bin/yo -> /root/.node/lib/node_modules/yo/cli.js  > yo@1.3.3 postinstall /root/.node/lib/node_modules/yo > yodoctor  sh: 1: yodoctor: permission denied  npm err! yo@1.3.3 postinstall: `yodoctor` npm err! exit status 127 npm err!  npm err! failed @ yo@1.3.3 postinstall script. npm err! problem yo package, npm err! not npm itself. npm err! tell author fails on system: npm err!     yodoctor npm err! can info via: npm err!     npm owner ls yo npm err! there additional logging output above. npm err! system linux 3.13.0-37-generic npm err! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "yo" npm err! cwd /root npm err! node -v v0.10.33 npm err! npm -v 1.4.28 npm err! code elifecycle npm err! not ok code 0 

i have tried reinstall ubuntu (14.04) nothing works.

i think shantaru right, need sudo.

try this

sudo npm uninstall -g yo sudo npm cache clean sudo npm install -g yo 

i have similar problem weeks ago , works.

edit: if didn't work, before:

npm config set unsafe-perm true 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -