I have something weird happens with my build on Netlify. I have two Gatsby sites in Node 18, Gatsby 5 just updated from Node 16 and Gatsby 4.
The both are deploying on Netlify and Gatsby Cloud. They both have a good deployment on Gatsby Cloud, but on Netlify one is failed. Before the migration to Gatby 5, that that's work very well to deploy on both platform.
I found this difference in the log, with the one work well, and the uggly work bad ! the failed happens after this call
10:44:36 AM: Using ruby version 2.7.2
10:44:36 AM: Using PHP version 8.0
10:44:36 AM: No npm workspaces detected
10:44:36 AM: Started restoring cached node modules
10:44:36 AM: Finished restoring cached node modules
10:44:37 AM: Installing NPM modules using NPM version 8.19.2
10:44:38 AM: npm ERR! code ERESOLVE
10:44:38 AM: npm ERR! ERESOLVE could not resolve
but the other who is deployed well, don't try to install the NPM modules
10:14:47 PM: Using ruby version 2.7.1
10:14:47 PM: Using PHP version 8.0
10:14:47 PM: No npm workspaces detected
10:14:47 PM: Started restoring cached node modules
10:14:47 PM: Finished restoring cached node modules
10:14:47 PM: Started restoring cached go cache
10:14:47 PM: Finished restoring cached go cache
I try to change the NPM version to 8.19.3, but I failed to do that. I don't find a solution to say to Netlify don't use 8.19.2 or simply don't use NPM like in deployment who work well.
There is any solution to set something everywhere to use a specific version of npm
or use something like --legacy-peer-deps
I don't find on internet how to set something like that to try those solutions.
Sorry If my explication is not really clear, but I'm not an expert in deployment and npm. I hope any people have i track to follow a solution.