【问题标题】:Cannot run Bower as Root, where is Bower Configuration file in Debian?无法以 Root 身份运行 Bower,Debian 中的 Bower 配置文件在哪里?
【发布时间】:2015-02-15 05:29:54
【问题描述】:

下午好,

我正在尝试在现有项目上运行“bower install”命令,但出现错误

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.

通过阅读下面的帖子,我知道我需要将选项 allow_root: false 更改为 true

Run bower from root user, it's possible? How?

但是,我找不到需要更改此选项的文件!

我在 Debian7 中哪里可以找到这个文件?或者同样,我可以在“bower install”命令的某处输入这个选项吗???

我无法以用户身份运行它,因为该项目需要 root 才能完成其他所有操作。 谢谢,

【问题讨论】:

    标签: jquery node.js debian npm bower


    【解决方案1】:

    在您的项目中创建一个 .bowerrc 文件,然后添加 allow_root: true 选项。 Check here

    【讨论】:

      【解决方案2】:

      只需添加标志:

      sudo bower install --allow-root

      【讨论】:

        猜你喜欢
        • 2016-05-03
        • 2016-01-25
        • 2017-07-30
        • 2016-10-07
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-02-08
        • 1970-01-01
        相关资源
        最近更新 更多