我在尝试从bower.json(bower install)安装依赖项时遇到此错误,我不知道它是什么或我如何解决它...任何帮助都会被贬低。
✘ deniz946@UbuntuOS ~/Desktop/meanapp/client resourcejs bower install
/home/deniz946/.nvm/versions/node/v5.0.0/lib/node_modules/bower/lib/node_modules/configstore/index.js:54
throw err;
^
Error: EACCES: permission denied, open '/home/deniz946/.config/configstore/bower-github.json'
You don't have access to this file.
at Error (native)
at Object.fs.openSync (fs.js:584:18)
at Object.fs.readFileSync (fs.js:431:33)
at Object.create.all.get (/home/deniz946/.nvm/versions/node/v5.0.0/lib/node_modules/bower/lib/node_modules/configstore/index.js:35:26)
at Object.Configstore (/home/deniz946/.nvm/versions/node/v5.0.0/lib/node_modules/bower/lib/node_modules/configstore/index.js:28:44)
at readCachedConfig (/home/deniz946/.nvm/versions/node/v5.0.0/lib/node_modules/bower/lib/config.js:19:23)
at defaultConfig (/home/deniz946/.nvm/versions/node/v5.0.0/lib/node_modules/bower/lib/config.js:11:12)
at Object.<anonymous> (/home/deniz946/.nvm/versions/node/v5.0.0/lib/node_modules/bower/lib/index.js:16:32)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
答案 0 :(得分:5)
此命令应该有效。它提供了下载移民的许可。
sudo chown -R $ USER:$ GROUP~ / .npm
sudo chown -R $ USER:$ GROUP~ / .config
并通过
授予文件夹权限sudo chmod -R 777 foldername
答案 1 :(得分:1)
您正面临访问权限错误。使用sudo:
sudo
修改强>
bower install
似乎与bower install --allow-root
无关。这对我有用:
cmake .