Not sure why it’s asking me to run gatsby develop or that it might be necessary to add env variables. I only added “npm install -g npm@8.5.5” recently to see if that would help. I also set NPM_FLAGS to --legacy-peer-deps also
3:00:43 AM: info Done building in 127.324099473 sec
3:00:45 AM: err could not establish a connection with the dev server
3:00:45 AM: attempted connection to http://localhost:8000/___graphql
3:00:45 AM: make sure you"ve run gatsby develop
and set the
following env variables (if necessary)
3:00:45 AM: - HOST (default: localhost)
3:00:45 AM: - PORT (default: 8000)
3:00:45 AM: - LOG_LEVEL (default: error)
3:00:45 AM: - GRAPHQL_PATH (default: /___graphql)
3:00:45 AM:
3:00:45 AM: “build.command” failed
3:00:45 AM: ────────────────────────────────────────────────────────────────
3:00:45 AM:
3:00:45 AM: Error message
3:00:45 AM: Command failed with exit code 1: npm install -g npm@8.5.5 && npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
3:00:45 AM:
3:00:45 AM: Error location
3:00:45 AM: In Build command from Netlify app:
3:00:45 AM: npm install -g npm@8.5.5 && npm run build
3:00:45 AM:
3:00:45 AM: Resolved config
3:00:45 AM: build:
3:00:45 AM: base: /opt/build/repo/client
3:00:45 AM: command: npm install -g npm@8.5.5 && npm run build
3:00:45 AM: commandOrigin: ui
3:00:45 AM: environment:
3:00:45 AM: - NPM_FLAGS
3:00:45 AM: publish: /opt/build/repo/client/public
3:00:45 AM: publishOrigin: ui
3:00:45 AM: plugins:
3:00:45 AM: - inputs: {}
3:00:45 AM: origin: config
3:00:45 AM: package: “@netlify/plugin-gatsby”
3:00:45 AM: Caching artifacts
3:00:45 AM: Started saving node modules
3:00:45 AM: Finished saving node modules
3:00:45 AM: Started saving build plugins
3:00:45 AM: Finished saving build plugins
3:00:45 AM: Started saving corepack cache
3:00:45 AM: Finished saving corepack cache
3:00:45 AM: Started saving yarn cache
3:00:49 AM: Finished saving yarn cache
3:00:49 AM: Started saving pip cache
3:00:49 AM: Finished saving pip cache
3:00:49 AM: Started saving emacs cask dependencies
3:00:49 AM: Finished saving emacs cask dependencies
3:00:49 AM: Started saving maven dependencies
3:00:49 AM: Finished saving maven dependencies
3:00:49 AM: Started saving boot dependencies
3:00:49 AM: Finished saving boot dependencies
3:00:49 AM: Started saving rust rustup cache
3:00:49 AM: Finished saving rust rustup cache
3:00:49 AM: Started saving go dependencies
3:00:49 AM: Finished saving go dependencies
3:00:50 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
3:00:50 AM: Failing build: Failed to build site
3:00:50 AM: Finished processing build request in 3m13.737s
3:00:50 AM: Failed during stage “building site”: Build script returned non-zero exit code: 2