Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 982
Bennett Avatar asked Feb 26 '17 19:02

Bennett


People also ask

Is node JS 10 deprecated?

Node. js 10 has been considered EOL by the OpenJS Foundation since April 2021 and has been deprecated in SonarSource products since that time (with warnings in the analysis logs and user interfaces).

How do I check my version of node JS?

To see if Node is installed, open the Windows Command Prompt, Powershell or a similar command line tool, and type node -v . This should print the version number so you'll see something like this v0. 10.35 .


2 Answers

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"

like image 61
Canastro Avatar answered Oct 18 '22 12:10

Canastro


You can specify the node version as described here.

like image 23
Josh Avatar answered Oct 18 '22 13:10

Josh