简体   繁体   English

无法以root身份运行Bower,Debian中的Bower配置文件在哪里?

[英]Cannot run Bower as Root, where is Bower Configuration file in Debian?

Good afternoon, 下午好,

I am attempting to run a "bower install" command on an existing project, but I get the error 我试图在现有项目上运行“ 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.

From reading the post below, I understand I need to change the option allow_root: false to true 通过阅读下面的文章,我了解我需要将allow_root: false选项更改为true

Run bower from root user, it's possible? 从root用户运行bower,这可能吗? How? 怎么样?

However, I cannot find the file where I need to change this option!! 但是,我找不到需要更改此选项的文件!!

Where can I locate this file in Debian7? 我在Debian7的哪里可以找到这个文件? Or likewise, can I input this option somewhere in the "bower install" command??? 或者同样,我可以在“ bower install”命令的某处输入此选项吗???

I cannot run this as a user, because the project requires root for everything else. 我不能以用户身份运行,因为该项目需要root才能进行其他所有操作。 Thanks, 谢谢,

只需添加标志:

sudo bower install --allow-root

Create a .bowerrc file in your project, then add the allow_root: true option. 在您的项目中创建一个.bowerrc文件,然后添加allow_root: true选项。 Check here 在这里检查

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM