I have a new react app that I’m trying to deploy from github. This app uses webpack and all the usual stuff, and I have my build command in package.json:
"build": "webpack --config webpack/webpack.config.js --env env=prod",
I also defined the netlify.toml like this
NODE_VERSION = “14.17.0”
NPM_VERSION = “7.15.1”
NPM_FLAGS = “–legacy-peer-deps”
and my deploy settings like this:
Base directory: .
Build command: npm run build
Publish directory: ./build
Deploy log visibility: Logs are public
However, the deploy keeps failing (I’ve tried different configurations), but I keep "Failed during stage ‘building site’. Build script returned non-zero exit code 2.
This isn’t my first netlify site, so normally I’d try and troubleshooting it first, but I also don’t get any deploy logs, and the only message I get is this
6:32:19 PM: [ERROR] Deploy logs are currently unavailable. We are working on resolving the issue.
Your status page doesn’t show any issues, and I’ve been trying to fix this since yesterday, but I couldn’t get the deploy logs to show up so I can troubleshoot further.
I looked into the browser console (I also tried on 2 different browsers), and I can see that at least 2 API calls fail in the network with a status code of 412.
I would appreciate any help. Thanks