Bennett
Bennett

Reputation: 1107

Travis CI not using correct node.js version

I'm writing ES6 code, using class and const, but Travis CI is saying that my build is failing because it is running my test script with node.js version 0.10.48. Here is a link to the failed build: https://travis-ci.org/javacoolme/google-sign-in/builds/205586193.

Upvotes: 8

Views: 6342

Answers (2)

Josh
Josh

Reputation: 669

You can specify the node version as described here.

Upvotes: 2

Canastro
Canastro

Reputation: 3009

You should specify the node versions you want to test in your .travis.yml file like this:

language: node_js
node_js:
  - "6"
  - "4"

Make sure you have the correct indentation... Only 2 spaces before - "6"

Upvotes: 9

Related Questions