When I try to build by site, it fails

5:00:25 PM: build-image version: 69285e8b40f1b6adf78be62b2fda2250efb9694b (focal)
5:00:25 PM: buildbot version: 69285e8b40f1b6adf78be62b2fda2250efb9694b
5:00:25 PM: Fetching cached dependencies
5:00:25 PM: Failed to fetch cache, continuing with build
5:00:25 PM: Starting to prepare the repo for build
5:00:26 PM: No cached dependencies found. Cloning fresh repo
5:00:26 PM: git clone --filter=blob:none GitHub - Ali-Mehdi404/forkify-application
5:00:26 PM: Preparing Git Reference refs/heads/main
5:00:31 PM: Parsing package.json dependencies
5:00:32 PM: Starting build script
5:00:33 PM: Installing dependencies
5:00:33 PM: Python version set to 2.7
5:00:33 PM: v16.19.1 is already installed.
5:00:33 PM: Now using node v16.19.1 (npm v8.19.3)
5:00:33 PM: Enabling Node.js Corepack
5:00:33 PM: Started restoring cached build plugins
5:00:33 PM: Finished restoring cached build plugins
5:00:33 PM: Attempting Ruby version 2.7.2, read from environment
5:00:34 PM: Using Ruby version 2.7.2
5:00:34 PM: Using PHP version 8.0
5:00:34 PM: Started restoring cached corepack dependencies
5:00:34 PM: Finished restoring cached corepack dependencies
5:00:34 PM: No npm workspaces detected
5:00:34 PM: Started restoring cached node modules
5:00:34 PM: Finished restoring cached node modules
5:00:35 PM: Installing npm packages using npm version 8.19.3
5:00:36 PM: npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: Array.prototype.sort() - JavaScript | MDN
5:00:39 PM: added 210 packages, and audited 211 packages in 4s
5:00:39 PM: 92 packages are looking for funding
5:00:39 PM: run npm fund for details
5:00:39 PM: found 0 vulnerabilities
5:00:39 PM: npm packages installed
5:00:39 PM: Started restoring cached go cache
5:00:39 PM: Finished restoring cached go cache
5:00:39 PM: go version go1.19.6 linux/amd64
5:00:39 PM: Detected 1 framework(s)
5:00:39 PM: β€œparcel” at version β€œunknown”
5:00:39 PM: Section completed: initializing
5:00:41 PM: ​
5:00:41 PM: Netlify Build
5:00:41 PM: ────────────────────────────────────────────────────────────────
5:00:41 PM: ​
5:00:41 PM: ❯ Version
5:00:41 PM: @netlify/build 29.6.3
5:00:41 PM: ​
5:00:41 PM: ❯ Flags
5:00:41 PM: baseRelDir: true
5:00:41 PM: buildId: 6406d2f8f5501d3cca077dad
5:00:41 PM: deployId: 6406d2f8f5501d3cca077daf
5:00:41 PM: ​
5:00:41 PM: ❯ Current directory
5:00:41 PM: /opt/build/repo
5:00:41 PM: ​
5:00:41 PM: ❯ Config file
5:00:41 PM: No config file was defined: using default values.
5:00:41 PM: ​
5:00:41 PM: ❯ Context
5:00:41 PM: production
5:00:41 PM: ​
5:00:41 PM: 1. Build command from Netlify app
5:00:41 PM: ────────────────────────────────────────────────────────────────
5:00:41 PM: ​
5:00:41 PM: $ npm run build
5:00:41 PM: > forkify@1.0.0 build
5:00:41 PM: > parcel build starter/index.html --dist-dir ./dist
5:00:41 PM: Error: Unable to deserialize cloned data due to invalid or unsupported version.
5:00:41 PM: at deserialize (node:v8:380:7)
5:00:41 PM: at deserialize (/opt/build/repo/node_modules/@parcel/core/lib/serializer.js:249:48)
5:00:41 PM: at loadRequestGraph (/opt/build/repo/node_modules/@parcel/core/lib/RequestTracker.js:887:52)
5:00:41 PM: at async Function.init (/opt/build/repo/node_modules/@parcel/core/lib/RequestTracker.js:854:17)
5:00:41 PM: at async Parcel._init (/opt/build/repo/node_modules/@parcel/core/lib/Parcel.js:256:28)
5:00:41 PM: at async Parcel.run (/opt/build/repo/node_modules/@parcel/core/lib/Parcel.js:273:7)
5:00:41 PM: at async run (/opt/build/repo/node_modules/parcel/lib/cli.js:376:7)
5:00:41 PM: ​
5:00:41 PM: β€œbuild.command” failed
5:00:41 PM: ────────────────────────────────────────────────────────────────
5:00:41 PM: ​
5:00:41 PM: Error message
5:00:41 PM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
5:00:41 PM: ​
5:00:41 PM: Error location
5:00:41 PM: In Build command from Netlify app:
5:00:41 PM: npm run build
5:00:41 PM: ​
5:00:41 PM: Resolved config
5:00:41 PM: build:
5:00:41 PM: command: npm run build
5:00:41 PM: commandOrigin: ui
5:00:41 PM: publish: /opt/build/repo/dist
5:00:41 PM: publishOrigin: ui
5:00:42 PM: Caching artifacts
5:00:42 PM: Started saving node modules
5:00:42 PM: Finished saving node modules
5:00:42 PM: Started saving build plugins
5:00:42 PM: Finished saving build plugins
5:00:42 PM: Started saving corepack cache
5:00:42 PM: Finished saving corepack cache
5:00:42 PM: Started saving pip cache
5:00:43 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)
5:00:42 PM: Finished saving pip cache
5:00:42 PM: Started saving emacs cask dependencies
5:00:42 PM: Finished saving emacs cask dependencies
5:00:42 PM: Started saving maven dependencies
5:00:42 PM: Finished saving maven dependencies
5:00:42 PM: Started saving boot dependencies
5:00:42 PM: Finished saving boot dependencies
5:00:42 PM: Started saving rust rustup cache
5:00:42 PM: Finished saving rust rustup cache
5:00:42 PM: Started saving go dependencies
5:00:42 PM: Finished saving go dependencies
5:00:43 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
5:00:43 PM: Failing build: Failed to build site
5:00:43 PM: Finished processing build request in 18.04s

Whenever I try to build this site, it always gives the same error

The error seems to be this…

A quick google points to…

Hi @AliM nathan pointed out the error. If you correct those issues and you are still experiencing trouble would you mind sharing your site name so we can investigate further? I also recommend you give this guide a read.

Unfortunately that didn’t work but thanks for trying to help.

It didn’t work.

Here’s the site name: silly-gaufre-2e8274

The actual site is https://silly-gaufre-2e8274.netlify.app/

@AliM Netlify generally won’t debug your build for you, as it’s outside of their Scope of Support.

Can you make your repository public?

It’ll let others pull and run your code locally to see if they can spot what the issue is.

1 Like

Never mind.

I tried it again and it worked. Thanks a lot for your help!

Hi @AliM thanks for letting us know your problem was solved.