Currently, Glitch supports Node.js versions 9.11.2 through 16.14.2, but will be deprecating (removing from containers) Node versions below 12 starting on February 28, 2024.
These are the versions of Node you can use as of 2024-01-17:
16.14.2
14.19.1
12.0.0
11.15.0 - deprecating scheduled for Feb 28, 2024 (in progress but delayed)
10.24.1 - deprecating scheduled for Feb 28, 2024 (in progress but delayed)
9.11.2 - deprecating scheduled for Feb 28, 2024 (in progress but delayed)
8.17.0 - deprecated Dec. 15 2023
6.17.1 - deprecated Dec. 1 2023
You can change your version of Node by updating the engines field specified in your project's package.json file. You can specify the major version of Node you'd like to use as follows:
"engines": { "node": "16.x" }
Here's our timetable for Node version deprecation
You can read more about why this work is happening on our blog.
Date | What’s happening | What you need to do |
February 28, 2024 (delayed but in progress) | Deprecating Node < 12 | For projects still on node 11 or below, edit the Node version in your package.json file to 16.x |
Early 2024 (originally we said "before April" but due to incidents we are delayed a few weeks) | Container updates bring supported node versions | Glitch will be updated with fully supported node versions, along with an updated node version support timetable, giving users at least six weeks to plan upgrades |
What happens to projects running deprecated versions of Node?
- Projects that have the Node engine set in package.json to a deprecated version (see list of supported versions above) will not run, but you can still go to the editor and update Node to a version we do support.
- After you've updated a deprecated Node version, the project container will need to go to sleep for the actual update to take place. This can take up to 12 hours, especially if it's a boosted project.
- Projects that do not have the Node engine set in package.json will default to using Node version 10.24.1 until February 28, 2024 when the default will be Node 12.0.0.
Some things to note:
- Do not edit the version of Node within the terminal or add Node as a dependency in your package.json file. Users have reported inconsistent and mostly broken experiences from doing so.
- We're working on improving our response to new Node versions coming out and plan to have not only the latest version of Node, but a predictable, consistent schedule for keeping Node updated on containers.
How Glitch installs Node dependencies based on Node version:
Glitch typically uses whatever version of npm comes with the version of Node you're using. For Node versions older than Node 14, though, it uses pnpm.
-
If you have a project that uses Node 14 or Node 16, packages will be installed via npm.
-
If you have a project that uses Node 14 or Node 16 and it is currently getting stuck in an install loop, open the project terminal and run the command,
enable-npm
. -
If you have a project that uses a version of Node that is older than Node 14 (Node 12), packages will still be installed via pnpm, unless you have specifically opted into using npm in the past.