Console node version appears to be different from the project


#1

My package.json lists:

  "engines": {
    "node": "8.4.0"
  },

If I go to the console, and run node --version, I get back v6.11.2. I expected it to output 8.4.0.


#2

The console runs a different node version (but it can be changed with nvm use X). The version of node your project is using gets outputted to the logs during the installation phase, so that’s where you can tell if it’s picking up your package.json settings or not.


#3

The console runs a different node version (but it can be changed with nvm use X).

I have tried nvm use stable and go back to editor but I got the error below:

Node.js version >=7.7 is required. You have v6.12.0.

#4

Actually, we fixed this a few days ago, now the terminal uses the same node version as the app. It can still be changed using nvm :slight_smile:


#5

Also, nvm only changes the node version in the terminal. To change the version that the app uses, you have to change it in package.json, you can set for example 8.x as the value of the key engines.node


#6

I have set the engine property. Here is the code below but it does not work. Any idea?


#7

We don’t yet support the format >=8.0.0, try to set it to 8.x instead :slight_smile: