Getting a permission error when installing with bower

十年热恋 提交于 2019-11-29 21:04:07
Aljoscha

Tried with sudo ?

sudo bower install --allow-root
sudo bower install jquery

Another solution is to change the chown of your configstore folder

sudo chown -R Andreas:Andreas /Users/Andreas/.config/configstore/
bower init
bower install jquery

If there are more errors with eaccess, expand the chown to your whole home folder

Here is the fix, run below commands. it should work.

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
Adam Fuzum

Change the json bower configuration file .bowerrc which looks like

{
    "directory": "www/lib"
}

to look like

{
    "directory": "www/lib",
    "allow_root": true
}

you can just copy and paste this on your terminal

sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!