0
votes

I can't install generators using Yeoman.

Not sure how to resolve this, using OSX Yosemite.

npm ERR! Darwin 14.1.0 npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "generator-aspnet" npm ERR! node v0.12.0 npm ERR! npm v2.5.1 npm ERR! path /Users/briandouglas/.node/lib/node_modules/generator-aspnet npm ERR! code EACCES npm ERR! errno -13

npm ERR! Error: EACCES, unlink '/Users/briandouglas/.node/lib/node_modules/generator-aspnet' npm ERR! at Error (native) npm ERR! { [Error: EACCES, unlink '/Users/briandouglas/.node/lib/node_modules/generator-aspnet'] npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! path: '/Users/briandouglas/.node/lib/node_modules/generator-aspnet' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! error rolling back Error: EACCES, unlink '/Users/briandouglas/.node/lib/node_modules/generator-aspnet' npm ERR! error rolling back at Error (native) npm ERR! error rolling back { [Error: EACCES, unlink '/Users/briandouglas/.node/lib/node_modules/generator-aspnet'] npm ERR! error rolling back errno: -13, npm ERR! error rolling back
code: 'EACCES', npm ERR! error rolling back path: '/Users/briandouglas/.node/lib/node_modules/generator-aspnet' }

npm ERR! Please include the following file with any support request: npm ERR! /Users/briandouglas/npm-debug.log

2

2 Answers

0
votes

The error message is telling you that you don't have permission to make the requested modifications.

Perhaps at some point in the past you've run npm as sudo npm ..., which would have run it as root and written files in such a way that your user may not be permitted to change them. Only the files written at that time would have been affected.

Try running chown -R briandouglas ~/.node and then trying to install the generator again.

0
votes

If changing permissions doesn´t solve your problem. Try uninstalling modules installed as root sudo npm uninstall -g *** and installing again not as sudo. this should be enough.