I am having issues deploying recent changes made from a Gatsby project to Netlify. Start and build commands for the project locally works fine.
Here is the problem:
error gatsby@3.6.0: The engine "node" is incompatible with this module. Expected version ">=12.13.0". Got "10.24.1"
Here are links to the repo and deployment log:
https://github.com/simonxcode/simonxcode.com https://app.netlify.com/sites/simonxcode/deploys/60aeec1c22d2e5154232e488
I know this question has been asked numerous times before, but none of the common solutions worked for me. Perhaps I am executing them incorrectly or may be missing something else.
Here are the solutions that I have tried:
execute
yarn --ignore-engines
from How to ignore incompatible engine "node" error on installing npm dependencies with yarn?set node variable in
.env
file (not visible in repo because.gitignore
) from Setting Environment Variables for Node to retrieve//.env file NODE_ENV=development
add
"engine": { "node": ">=12.13.0"}
topackage.json
from The engine "node" is incompatible with this moduleUpdate node with
brew update
andbrew upgrade node
from The engine "node" is incompatible with this moduleNote 1: Before updating Homebrew, I deleted
node_modules/
andyarn.lock
filesNote 2: after executing
brew postinstall node
andbrew link --overwrite node
, I no longer have access to node, yarn or gatsby when checking withnode -v
,yarn -v
andgatsby -v