As im trying to deploy my site I got rejected for several times now.
I hope someone is able to provide me a solution. Please see the error code below.
Already tried with a new environment variable CI false, but stil the same error.
7:32:16 PM: ────────────────────────────────────────────────────────────────
7:32:16 PM: “build.command” failed
7:32:16 PM: ────────────────────────────────────────────────────────────────
7:32:16 PM:
7:32:16 PM: Error message
7:32:16 PM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
7:32:16 PM:
7:32:16 PM: Error location
7:32:16 PM: In Build command from Netlify app:
7:32:16 PM: npm run build
7:32:16 PM:
7:32:16 PM: Resolved config
7:32:16 PM: build:
7:32:16 PM: command: npm run build
7:32:16 PM: commandOrigin: ui
7:32:16 PM: environment:
7:32:16 PM: - CI
7:32:16 PM: - NEXT_PRIVATE_TARGET
7:32:16 PM: publish: /opt/build/repo/.next
7:32:16 PM: publishOrigin: ui
7:32:16 PM: plugins:
7:32:16 PM: - inputs: {}
7:32:16 PM: origin: ui
7:32:16 PM: package: ‘@netlify/plugin-nextjs’
7:32:16 PM: Caching artifacts
7:32:16 PM: Started saving node modules
7:32:16 PM: Finished saving node modules
7:32:16 PM: Started saving build plugins
7:32:16 PM: Finished saving build plugins
7:32:16 PM: Started saving pip cache
7:32:16 PM: Finished saving pip cache
7:32:16 PM: Started saving emacs cask dependencies
7:32:16 PM: Finished saving emacs cask dependencies
7:32:16 PM: Started saving maven dependencies
7:32:16 PM: Finished saving maven dependencies
7:32:16 PM: Started saving boot dependencies
7:32:16 PM: Finished saving boot dependencies
7:32:16 PM: Started saving rust rustup cache
7:32:16 PM: Finished saving rust rustup cache
7:32:16 PM: Started saving go dependencies
7:32:16 PM: Finished saving go dependencies
7:32:17 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
7:32:17 PM: Creating deploy upload records
7:32:17 PM: Failing build: Failed to build site
7:32:17 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
7:32:18 PM: Finished processing build request in 45.72988237s