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-enginesfrom How to ignore incompatible engine "node" error on installing npm dependencies with yarn?set node variable in
.envfile (not visible in repo because.gitignore) from Setting Environment Variables for Node to retrieve//.env file NODE_ENV=developmentadd
"engine": { "node": ">=12.13.0"}topackage.jsonfrom The engine "node" is incompatible with this moduleUpdate node with
brew updateandbrew upgrade nodefrom The engine "node" is incompatible with this moduleNote 1: Before updating Homebrew, I deleted
node_modules/andyarn.lockfilesNote 2: after executing
brew postinstall nodeandbrew link --overwrite node, I no longer have access to node, yarn or gatsby when checking withnode -v,yarn -vandgatsby -v