Skip to content

How to Enable Node v18 in Netlify for Gatsby v5

Published:

I just updated this site to Gatsby v5, but on Netlify I kept getting "Unsupported engine" error. It was because Netlify was trying to build the site using Node v16, which ends up failing as Gatsby v5 has Node v18 as a requirement.

Here's how you can change to Node 18 on Netlify:

Screenshot of Netlify settings

Go to your Netlify project deploy settings and find the Environment variables. Add NODE_VERSION there with the value 18. You can also specify an exact Node version, such as v18.1.0, but by using just 18 Netlify will automatically choose the recommended v18 version.

Thats it! You will need to do a full cache clear most likely.