8:07:31 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)
8:07:29 PM: Netlify Build
8:07:29 PM: ────────────────────────────────────────────────────────────────
8:07:29 PM:
8:07:29 PM: ❯ Version
8:07:29 PM: @netlify/build 29.18.0
8:07:29 PM:
8:07:29 PM: ❯ Flags
8:07:29 PM: baseRelDir: true
8:07:29 PM: buildId: 64d2ca9e70b15900691d2a3b
8:07:29 PM: deployId: 64d2ca9e70b15900691d2a3d
8:07:29 PM:
8:07:29 PM: ❯ Current directory
8:07:29 PM: /opt/build/repo/public
8:07:29 PM:
8:07:29 PM: ❯ Config file
8:07:29 PM: No config file was defined: using default values.
8:07:29 PM:
8:07:29 PM: ❯ Context
8:07:29 PM: production
8:07:29 PM:
8:07:29 PM: Build command from Netlify app
8:07:29 PM: ────────────────────────────────────────────────────────────────
8:07:29 PM:
8:07:29 PM: $ CI= npm run build
8:07:29 PM: > build
8:07:29 PM: > webpack --progress --colors
8:07:29 PM: sh: 1: webpack: not found
8:07:29 PM:
8:07:29 PM: build.command failed
8:07:29 PM: ────────────────────────────────────────────────────────────────
8:07:29 PM:
8:07:29 PM: Error message
8:07:29 PM: Command failed with exit code 127: CI= npm run build (Search results for '"non-zero exit code: 127"' - Netlify Support Forums)
8:07:29 PM:
8:07:29 PM: Error location
8:07:29 PM: In Build command from Netlify app:
8:07:29 PM: CI= npm run build
8:07:29 PM:
8:07:29 PM: Resolved config
8:07:29 PM: build:
8:07:29 PM: base: /opt/build/repo/public
8:07:29 PM: command: CI= npm run build
8:07:29 PM: commandOrigin: ui
8:07:29 PM: publish: /opt/build/repo/public
8:07:29 PM: publishOrigin: default
8:07:31 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
8:07:31 PM: Failing build: Failed to build site
8:07:31 PM: Finished processing build request in 19.346s
Hi there, glad you found us before we can help you, we need a little more information on the issues you are facing.
First, have you looked through this resource? It is a compilation of all of our build and deploy resources. This is a good starting point.
If you have worked through those guides and are still encountering issues please share the following information:
- the name of your build instance: “example-jones.netlify.com”
- what you have already tried
- any error messages you have received in your terminal window or in the developer console