bower的安装问题

不用sudo 装不上bower,init的时候提示:

Error: EACCES, permission denied '/home/xm/.config/configstore/insight-bower.yml'
You don't have access to this file.

用sudo bower init又错误:

    bower ESUDO         Cannot be run with sudo

Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.
阅读 13k
2 个回答

安装的时候需要 sudo npm -g install bower --allow-root
这样安装就没有什么问题。

你现在的问题是用户权限不够造成的,你可以:
sudo chown -R 你所操作的用户名 /home/xm/
这样应该就可以了
希望有帮助!

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进