我已经看到有关角度生成器的其他类似 Yeoman 问题,但没有解决此特定错误。该yo doctor
命令告诉我一切都很好,然后当我尝试运行时,$ npm install -g generator-angular
我收到以下消息。我不确定它是权限问题还是什么。如果有任何帮助,我将不胜感激。
Christophers-MacBook-Pro% npm install -g generator-angular
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/generator-angular'
npm ERR! { [Error: EACCES, unlink '/usr/local/lib/node_modules/generator-angular']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/generator-angular' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 14.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "generator-angular"
npm ERR! cwd /Users/christopherfristoe
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path /usr/local/lib/node_modules/generator-angular
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/usr/local/lib/node_modules/generator-angular'
npm ERR! error rolling back Error: EACCES, unlink '/usr/local/lib/node_modules/generator-angular'
npm ERR! error rolling back { [Error: EACCES, unlink '/usr/local/lib/node_modules/generator- angular']
npm ERR! error rolling back errno: 3,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/generator-angular' }
npm ERR! not ok code 0
Christophers-MacBook-Pro%