问题症状
g new my-project
/usr/local/lib/node_modules/angular-cli/node_modules/configstore/index.js:54
throw err;
^
Error: EACCES: permission denied, open '/Users/xuys/.config/configstore/ember-cli.json'
You don't have access to this file.
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
解决方法:
修改ng目录的权限为当前用户的权限。
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}