Specify a custom node version?


Is there a way to specify node 7? Looking at the logs I see node v6.10.1, npm 3.10.10 but my code uses node 7 features.

My package.json has:

"engines": {
    "node": "7.9.0"

…which is good enough for e.g. heroku but it didn’t seem to work on Glitch.


Yes, we have at least the following Node 7 versions available:
7.7.3 7.6.0 7.5.0 7.4.0 7.3.0 7.2.1 7.1.0 7.0.0
Specify one in your package.json:
"engines": { "node": "7.7.3" }


Ah, glitch has 7.8 but not 7.9. I naively assumed it would have the latest release but I was mistaken.



Also you can say

"engines": { "node": "7.x" },

and you’ll get the latest Glitch has. (It’s a standard Node feature to be able to specify versions that way, not just a Glitch feature, so that should work in Heroku too. [UPDATE: I confirmed it works in Heroku.])

PS: Node now recommends 6.10.2 LTS but looks like Glitch only has 6.10.1 currently.


I just got caught out by this too, as I tried to use 7.9.x. Ideally it should error & say which versions are available.


If anyone else is looking… I threw together a quick instance which will show the currently available node versions based on NVM (on that instance at least).