【问题标题】:Bower: invalid option: --allow-rootBower:无效选项:--allow-root
【发布时间】:2015-10-09 08:39:38
【问题描述】:

我在 ubuntu 14.04LTS 上遇到了这个问题:

当我rake bower:install:dev 时,我得到:

错误:EACCES,权限被拒绝 'home/MyName/.config/configstore/bower-github.yml' 你无权访问这个 文件。

当我sudo rake bower:install:dev 时,我得到:

bower ESUDO 不能用 sudo 运行

附加错误详情:由于 bower 是用户命令,因此没有 需要以超级用户权限执行。如果你有 不使用sudo使用bower时出现权限错误,请花一些 分钟学习更多关于你的系统应该如何工作并做出任何 必要的维修。

http://www.joyent.com/blog/installing-node-and-npm https://gist.github.com/isaacs/579814

您可以使用 sudo 使用 --allow-root 选项运行命令

当我sudo rake bower:install:dev --allow-root 时,我得到:

无效选项:--allow-root

我该如何解决这个问题?

【问题讨论】:

  • ll bower-github.yml 命令的输出是什么?
  • bower-github.yml 在 ruby​​ 应用程序文件夹中不存在。命令的输出是:ls: cannot access bower-github.yml: No such file or directory
  • 我的意思是这个文件home/MyName/.config/configstore/bower-github.yml文件不存在?
  • 确实存在,但是我已经解决了这个问题,看我的回答。

标签: ruby-on-rails linux ubuntu bower bower-install


【解决方案1】:

我通过在我的应用程序的根目录中添加 .bowerrc 文件来解决它,其中包含以下内容:

{ "allow_root": true }

【讨论】:

    猜你喜欢
    • 2016-05-03
    • 1970-01-01
    • 2015-02-15
    • 1970-01-01
    • 1970-01-01
    • 2013-04-19
    • 2011-09-27
    • 2016-12-06
    • 1970-01-01
    相关资源
    最近更新 更多