2

I recently upgraded my Gatsby project from 2.X to 3.X, but I'm having some deployment issues with Netlify. Where is this issue coming from and how can I update Node.js in Netlify?

Netlify Console:

5:24:48 PM: error Gatsby requires Node.js 12.13.0 or higher (you have v10.24.0).
5:24:48 PM: Upgrade Node to the latest stable release: https://gatsby.dev/upgrading-node-js

enter image description here

macOS Terminal:

enter image description here

jefelewis
  • 1,850
  • 1
  • 27
  • 63

2 Answers2

3

I was having the same issue when updating an existing Netlify site from Gatsby 2 to 3. The Netlify Forum suggests simply adding an environment variable to that Netlify site:

NODE_VERSION=12

I don't love this solution since deploying a Gatsby 3 project has no issues when deployed to a freshly created Netlify site, but it did get me going again.

Gregor
  • 585
  • 8
  • 19
-1

Try this :

In the root of your repository : node -v > .nvmrc (I suppose nvm is installed)

This creates a file with the Node version that should be used for build. If your repository's Node version is actually > 12.13.0, should be fine then.

You might need to run nvm use afterwards as mentioned in the linked thread.

ozenK
  • 265
  • 3
  • 10