angularjs - Permission denied while installing Yo -
i'm trying set yo use angular generator project. following steps detailled here: http://yeoman.io/learning/index.html
i have node.js , npm installed.
but when use command:
sudo npm install -g yo bower grunt-cli
it fails , error:
> spawn-sync@1.0.11 postinstall /usr/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync > node postinstall fs.js:439 return binding.open(pathmodule._makelong(path), stringtoflags(flags), mode); ^ error: eacces, permission denied '/usr/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync/package.json' @ object.fs.opensync (fs.js:439:18) @ object.fs.writefilesync (fs.js:978:15) @ object.<anonymous> (/usr/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync/postinstall.js:20:6) @ module._compile (module.js:456:26) @ object.module._extensions..js (module.js:474:10) @ module.load (module.js:356:32) @ function.module._load (module.js:312:12) @ function.module.runmain (module.js:497:10) @ startup (node.js:119:16) @ node.js:935:3 npm err! linux 3.13.0-24-generic npm err! argv "node" "/usr/bin/npm" "install" "-g" "yo" npm err! node v0.10.37 npm err! npm v2.11.0 npm err! code elifecycle npm err! spawn-sync@1.0.11 postinstall: `node postinstall` npm err! exit status 8 npm err! npm err! failed @ spawn-sync@1.0.11 postinstall script 'node postinstall'. npm err! problem spawn-sync package, npm err! not npm itself. npm err! tell author fails on system: npm err! node postinstall npm err! can info via: npm err! npm owner ls spawn-sync npm err! there additional logging output above. npm err! please include following file support request: npm err! /home/vincent/npm-debug.log
i tried use chmod 777 on /usr/lib/node_modules
doesn't seem work better.
i can install bower , grunt, worked, when try install yo, fails everytime...
i have no idea tried using chmod
or chown
didn't work.
thanks guys! :)
i worked around issue using:
sudo npm install -g yo --unsafe-perm
use of --unsafe-perm
suggested nyakto in bug report.
edit - realised url posted @stephan in answer.
i don't know specifics --unsafe-perm - can state allowed me install yo without errors experienced similar / identical op.
Comments
Post a Comment