XiaoQiang:imooc XieTongXue$ bower install bootstrap/usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:54 throw err; ^Error: EACCES: permission denied, open '/Users/XieTongXue/.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.create.all.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:541:32) at Object.Module._extensions..js (module.js:550:10)
1 回答
PanameraTurboS
TA贡献4条经验 获得超10个赞
百度上说这样改就可以
sudo bower install --allow-root
sudo bower install <package>
亲测不可用,最后在github找到解决办法,亲测可用。
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
- 1 回答
- 0 关注
- 2519 浏览
添加回答
举报
0/150
提交
取消