我试图将Yeoman与我的AngularJS应用程序一起使用,但是在运行' yo angular'时我遇到了这个错误。如何获得导致此错误的目录的权限?
Error: EACCES, permission denied '/Users/mycomputer/.config/configstore/insight-yo.yml'
You don't have access to this file.
at Object.fs.openSync (fs.js:438:18)
at Object.fs.writeFileSync (fs.js:977:15)
at Object.create.all.set (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:56:8)
at Object.Configstore (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:19:11)
at new Insight (/usr/local/lib/node_modules/yo/node_modules/insight/lib/insight.js:23:34)
at Object.<anonymous> (/usr/local/lib/node_modules/yo/cli.js:27:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
答案 0 :(得分:0)
我找到了解决问题的方法:
sudo chown -R `whoami` /usr/local/lib/node_modules