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



下午好,

我正在尝试在现有项目上运行"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

从根用户运行 bower,这可能吗?如何?

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

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

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

只需添加标志:

sudo bower install --allow-root

在项目中创建一个 .bowerrc 文件,然后添加 allow_root: true 选项。在这里查看

最新更新