gpt4 book ai didi

Gitlab 公共(public)运行程序不会运行 Bower,因为在 sudo 中运行

转载 作者:行者123 更新时间:2023-12-04 16:09:08 25 4
gpt4 key购买 nike

如何使用 gitlab public runner 在没有 sudo 的情况下运行 Bower 命令?

这是我的脚本

image: node:7
before_script:
- npm install -g bower
- bower install
...

这是我测试得到的结果。

...
npm info ok
$ bower install
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.

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

You can however run a command with sudo using --allow-root option
ERROR: Build failed: exit code 1

谢谢。

最佳答案

您应该在 Bower 命令后添加 --allow-root
请参阅:https://bower.io/docs/api/#allow-root

关于Gitlab 公共(public)运行程序不会运行 Bower,因为在 sudo 中运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42270280/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com