experiencing issues on building branches on netlify
The site’s link is: Netlify App
Its purpose is for staging branches before merging on a separate main site
I am aware that this is a very common problem but so far there is no solution that I have tried that have solved
It just puzzles me that I didnt change anything from the netlify settings or the files’ config to be able to have this problem
Error logs include:
8:43:22 AM: error email@example.com: The engine “node” is incompatible with this module. Expected version “>=12”. Got “10.24.1”
8:43:22 AM: error Found incompatible module.
8:43:22 AM: info Visithttps://yarnpkg.com/en/docs/cli/install for documentation about this command.
8:43:22 AM: Error during Yarn install
8:43:22 AM: Build was terminated: Build script returned non-zero exit code: 1
8:43:22 AM: Creating deploy upload records
8:43:22 AM: Failing build: Failed to build site
8:43:22 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1
8:43:22 AM: Finished processing build request in 1m3.366072801s
Similar problems I have tried solutions on:
I’ve also tried reinstalling node modules and yarn.lock and it still did not resolve the issue.
There is no problem locally as it able to build
Most of these solution end up needing to choose the node version which recommends the docs for managing dependencies
the node version is set on the .nvmrc file, it set to 10. we try to stay away from changing the node version because prior to this issue it is working properly. Setting these options did not solve the issue:
- Set a NODE_VERSION environment variable.
- Add a .node-version or .nvmrc file to the site’s base directory in your repository. This will also tell any other developer using the repository which version of Node.js it depends on.