Bower 权限被拒绝
Bower permission denied
我正在使用以下 angular-seed 应用程序:https://github.com/angular/angular-seed
当我执行 $ bower install
时,我收到以下错误:
/usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:54
throw err;
^
Error: EACCES: permission denied, open '/Users/Mac/.config/configstore/bower-github.json'
You don't have access to this file.
at Error (native)
at Object.fs.openSync (fs.js:640:18)
at Object.fs.readFileSync (fs.js:508:33)
at Object.get (/usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:35:26)
at Object.Configstore (/usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:28:44)
at readCachedConfig (/usr/local/lib/node_modules/bower/lib/config.js:19:23)
at defaultConfig (/usr/local/lib/node_modules/bower/lib/config.js:11:12)
at Object.<anonymous> (/usr/local/lib/node_modules/bower/lib/index.js:16:32)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
我该如何解决这个问题?
好的,所以我在不同的渠道问了很多人,得到了解决问题的办法。我想我会 post 在这里,以防万一有人遇到和我一样的问题。我执行了以下命令
$ sudo chown -R $USER:$GROUP ~/.npm
然后
$ sudo chown -R $USER:$GROUP ~/.config
然后
$ bower init
完成答案然后
$ bower install
我正在使用以下 angular-seed 应用程序:https://github.com/angular/angular-seed
当我执行 $ bower install
时,我收到以下错误:
/usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:54
throw err;
^
Error: EACCES: permission denied, open '/Users/Mac/.config/configstore/bower-github.json'
You don't have access to this file.
at Error (native)
at Object.fs.openSync (fs.js:640:18)
at Object.fs.readFileSync (fs.js:508:33)
at Object.get (/usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:35:26)
at Object.Configstore (/usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:28:44)
at readCachedConfig (/usr/local/lib/node_modules/bower/lib/config.js:19:23)
at defaultConfig (/usr/local/lib/node_modules/bower/lib/config.js:11:12)
at Object.<anonymous> (/usr/local/lib/node_modules/bower/lib/index.js:16:32)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
我该如何解决这个问题?
好的,所以我在不同的渠道问了很多人,得到了解决问题的办法。我想我会 post 在这里,以防万一有人遇到和我一样的问题。我执行了以下命令
$ sudo chown -R $USER:$GROUP ~/.npm
然后
$ sudo chown -R $USER:$GROUP ~/.config
然后
$ bower init
完成答案然后
$ bower install