gpt4 book ai didi

continuous-integration - travis:sh:0:无法打开/etc/init.d/xvfb

转载 作者:行者123 更新时间:2023-12-03 14:36:30 26 4
gpt4 key购买 nike

我的travis CI使用Ubuntu 14.04和Node.js8。我的.travis.yml看起来像:

language: node_js
node_js:
- 8
sudo: required
addons:
chrome: stable
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
install:
- npm set progress=false
- npm install
script:
- ng lint
- npm run test
- npm run e2e
- npm run build
我试图通过将其更改为使用Ubuntu 16.04和Node.js 10进行更新:
language: node_js
node_js:
- '10'
dist: xenial
sudo: required
addons:
chrome: stable
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
install:
- npm set progress=false
- npm install
script:
- ng lint
- npm run test
- npm run e2e
- npm run build
但是现在尝试启动 xvfb时出现错误:

0.00s$ sh -e /etc/init.d/xvfb start

sh: 0: Can't open /etc/init.d/xvfb

The command "sh -e /etc/init.d/xvfb start" failed and exited with 127 during .

最佳答案

解决方案是从sh -e /etc/init.d/xvfb start数组中删除before_script,然后在xvfb数组中简单地引入services

所以我的.travis.yml现在看起来像这样:

language: node_js
node_js:
- '10'
dist: xenial
sudo: required
services:
- xvfb
addons:
chrome: stable
before_script:
- export DISPLAY=:99.0
install:
- npm set progress=false
- npm install
script:
- ng lint
- npm run test
- npm run e2e
- npm run build

关于continuous-integration - travis:sh:0:无法打开/etc/init.d/xvfb,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55674746/

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