My travis CI uses Ubuntu 14.04 and Node.js 8. My .travis.yml looks like:
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 I've tried to update it to use Ubuntu 16.04 and Node.js 10 by changing it to:
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 However now I'm getting error when trying to start 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 .
The solution was to remove sh -e /etc/init.d/xvfb start from the before_script array and simply introduce xvfb in the services array.
So my .travis.yml now looks like this:
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With