我的 Travis CI 使用 Ubuntu 14.04 和 Node.js 8。我的 .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: 无法打开 /etc/init.d/xvfb
命令“sh -e /etc/init.d/xvfb start”在执行期间失败并以127退出。