Build failed due to a user error. Build script returned non-zero exit code: 2

My first time trying to deploy a website using parcel to build, don’t know why it’s giving me a user error, please help!

Deploy log is given below:

type or paste cod11:49:13 PM: Build ready to start
11:49:15 PM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
11:49:15 PM: build-image tag: v4.10.1
11:49:15 PM: buildbot version: f4df34fdee5e467fb0a8a2f62e3840ffaba0a9bc
11:49:15 PM: Building without cache
11:49:15 PM: Starting to prepare the repo for build
11:49:16 PM: No cached dependencies found. Cloning fresh repo
11:49:16 PM: git clone https://github.com/michael-j-rubenstein/website-tutorial
11:49:16 PM: Preparing Git Reference refs/heads/main
11:49:17 PM: Parsing package.json dependencies
11:49:17 PM: 
​
❯ Initial build environment
baseRelDir: true
branch: main
context: production
cwd: /opt/build/repo
featureFlags: []
mode: buildbot
repositoryRoot: /opt/build/repo
siteId: 0af13ada-84b0-430a-aa50-414f5c35a99a
​
❯ UI build settings
baseRelDir: true
build:
  command: parcel build index.html
  environment:
    - NETLIFY_BUILD_DEBUG
  publish: dist
​
❯ Resolved build environment
branch: main
buildDir: /opt/build/repo
context: production
env: []
​
❯ Resolved config
build:
  command: parcel build index.html
  commandOrigin: ui
  environment:
    - NETLIFY_BUILD_DEBUG
  publish: /opt/build/repo/dist
  publishOrigin: ui

11:49:17 PM: Starting build script
11:49:17 PM: Installing dependencies
11:49:17 PM: Python version set to 2.7
11:49:18 PM: v16.16.0 is already installed.
11:49:18 PM: Now using node v16.16.0 (npm v8.11.0)
11:49:18 PM: Started restoring cached build plugins
11:49:18 PM: Finished restoring cached build plugins
11:49:18 PM: Attempting ruby version 2.7.2, read from environment
11:49:19 PM: Using ruby version 2.7.2
11:49:19 PM: Using PHP version 8.0
11:49:19 PM: No npm workspaces detected
11:49:19 PM: Started restoring cached node modules
11:49:19 PM: Finished restoring cached node modules
11:49:19 PM: Installing NPM modules using NPM version 8.11.0
11:49:20 PM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
11:49:20 PM: npm WARN config location in the cache, and they are managed by
11:49:20 PM: npm WARN config     [`cacache`](http://npm.im/cacache).
11:49:20 PM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
11:49:20 PM: npm WARN config location in the cache, and they are managed by
11:49:20 PM: npm WARN config     [`cacache`](http://npm.im/cacache).
11:49:23 PM: npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
11:49:23 PM: npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
11:49:23 PM: npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
11:49:23 PM: npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
11:49:24 PM: npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
11:49:24 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: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
11:49:24 PM: npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
11:49:24 PM: npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
11:49:25 PM: npm WARN deprecated har-validator@5.1.5: this library is no longer supported
11:49:26 PM: npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
11:49:26 PM: npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
11:49:28 PM: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
11:49:29 PM: npm WARN deprecated parcel-bundler@1.12.4: Parcel v1 is no longer maintained. Please migrate to v2, which is published under the 'parcel' package. See https://v2.parceljs.org/getting-started/migration for details.
11:49:29 PM: npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
11:49:30 PM: added 801 packages, and audited 802 packages in 10s
11:49:30 PM: 59 packages are looking for funding
11:49:30 PM:   run `npm fund` for details
11:49:30 PM: 23 vulnerabilities (9 moderate, 14 high)
11:49:30 PM: To address issues that do not require attention, run:
11:49:30 PM:   npm audit fix
11:49:30 PM: To address all issues (including breaking changes), run:
11:49:30 PM:   npm audit fix --force
11:49:30 PM: Run `npm audit` for details.
11:49:30 PM: NPM modules installed
11:49:30 PM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
11:49:30 PM: npm WARN config location in the cache, and they are managed by
11:49:30 PM: npm WARN config     [`cacache`](http://npm.im/cacache).
11:49:30 PM: Started restoring cached go cache
11:49:30 PM: Finished restoring cached go cache
11:49:30 PM: Installing Go version 1.17 (requested 1.17)
11:49:35 PM: unset GOOS;
11:49:35 PM: unset GOARCH;
11:49:35 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.17.linux.amd64';
11:49:35 PM: export PATH="/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}";
11:49:35 PM: go version >&2;
11:49:35 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.17.linux.amd64.env"
11:49:35 PM: go version go1.17 linux/amd64
11:49:35 PM: Installing missing commands
11:49:35 PM: Verify run directory
11:49:36 PM: ​
11:49:36 PM: ────────────────────────────────────────────────────────────────
11:49:36 PM:   Netlify Build                                                 
11:49:36 PM: ────────────────────────────────────────────────────────────────
11:49:36 PM: ​
11:49:36 PM: ❯ Version
11:49:36 PM:   @netlify/build 27.9.1
11:49:36 PM: ​
11:49:36 PM: ❯ Flags
11:49:36 PM:   apiHost: api.netlify.com
11:49:36 PM:   baseRelDir: true
11:49:36 PM:   branch: main
11:49:36 PM:   buildId: 62f47c3917e12864a8fad3c3
11:49:36 PM:   buildbotServerSocket: /tmp/netlify-buildbot-socket
11:49:36 PM:   cacheDir: /opt/build/cache
11:49:36 PM:   cachedConfigPath: /tmp/netlify_config.json
11:49:36 PM:   context: production
11:49:36 PM:   cwd: /opt/build/repo
11:49:36 PM:   deployId: 62f47c3917e12864a8fad3c5
11:49:36 PM:   edgeFunctionsDistDir: /tmp/edge-62f47c3917e12864a8fad3c5
11:49:36 PM:   featureFlags:
11:49:36 PM:     - edge_functions_cache_cli
11:49:36 PM:     - edge_functions_produce_eszip
11:49:36 PM:   framework: parcel
11:49:36 PM:   functionsDistDir: /tmp/zisi-62f47c3917e12864a8fad3c5
11:49:36 PM:   mode: buildbot
11:49:36 PM:   nodePath: /opt/buildhome/.nvm/versions/node/v16.16.0/bin/node
11:49:36 PM:   repositoryRoot: /opt/build/repo
11:49:36 PM:   saveConfig: true
11:49:36 PM:   sendStatus: true
11:49:36 PM:   siteId: 0af13ada-84b0-430a-aa50-414f5c35a99a
11:49:36 PM:   statsd:
11:49:36 PM:     host: 10.65.137.241
11:49:36 PM:     port: 8125
11:49:36 PM:   systemLogFile: 3
11:49:36 PM:   testOpts:
11:49:36 PM:     silentLingeringProcesses: ''
11:49:36 PM: ​
11:49:36 PM: ❯ Current directory
11:49:36 PM:   /opt/build/repo
11:49:36 PM: ​
11:49:36 PM: ❯ Config file
11:49:36 PM:   No config file was defined: using default values.
11:49:36 PM: ​
11:49:36 PM: ❯ Resolved config
11:49:36 PM:   build:
11:49:36 PM:     command: parcel build index.html
11:49:36 PM:     commandOrigin: ui
11:49:36 PM:     environment:
11:49:36 PM:       - NETLIFY_BUILD_DEBUG
11:49:36 PM:     publish: /opt/build/repo/dist
11:49:36 PM:     publishOrigin: ui
11:49:36 PM: ​
11:49:36 PM: ❯ Context
11:49:36 PM:   production
11:49:36 PM: ​
11:49:36 PM: ────────────────────────────────────────────────────────────────
11:49:36 PM:   1. Build command from Netlify app                             
11:49:36 PM: ────────────────────────────────────────────────────────────────
11:49:36 PM: ​
11:49:36 PM: $ parcel build index.html
11:49:37 PM: 🚨  /opt/build/repo/images/logo.svg: Invalid Version: undefined
11:49:37 PM:     at new SemVer (/opt/build/repo/node_modules/@babel/preset-env/node_modules/semver/semver.js:314:11)
11:49:37 PM:     at compare (/opt/build/repo/node_modules/@babel/preset-env/node_modules/semver/semver.js:647:10)
11:49:37 PM:     at Function.lt (/opt/build/repo/node_modules/@babel/preset-env/node_modules/semver/semver.js:688:10)
11:49:37 PM:     at /opt/build/repo/node_modules/@babel/preset-env/lib/index.js:275:15
11:49:37 PM:     at Object.default (/opt/build/repo/node_modules/@babel/helper-plugin-utils/lib/index.js:23:12)
11:49:37 PM:     at getEnvPlugins (/opt/build/repo/node_modules/parcel-bundler/src/transforms/babel/env.js:62:34)
11:49:37 PM:     at getEnvConfig (/opt/build/repo/node_modules/parcel-bundler/src/transforms/babel/env.js:12:25)
11:49:37 PM:     at async getBabelConfig (/opt/build/repo/node_modules/parcel-bundler/src/transforms/babel/config.js:32:19)
11:49:37 PM:     at async babelTransform (/opt/build/repo/node_modules/parcel-bundler/src/transforms/babel/transform.js:6:16)
11:49:37 PM:     at async JSAsset.pretransform (/opt/build/repo/node_modules/parcel-bundler/src/assets/JSAsset.js:83:5)
11:49:38 PM: ​
11:49:38 PM: ────────────────────────────────────────────────────────────────
11:49:38 PM:   "build.command" failed                                        
11:49:38 PM: ────────────────────────────────────────────────────────────────
11:49:38 PM: ​
11:49:38 PM:   Error message
11:49:38 PM:   Command failed with exit code 1: parcel build index.html (https://ntl.fyi/exit-code-1)
11:49:38 PM: ​
11:49:38 PM:   Error location
11:49:38 PM:   In Build command from Netlify app:
11:49:38 PM:   parcel build index.html
11:49:38 PM: ​
11:49:38 PM:   Resolved config
11:49:38 PM:   build:
11:49:38 PM:     command: parcel build index.html
11:49:38 PM:     commandOrigin: ui
11:49:38 PM:     environment:
11:49:38 PM:       - NETLIFY_BUILD_DEBUG
11:49:38 PM:     publish: /opt/build/repo/dist
11:49:38 PM:     publishOrigin: ui
11:49:39 PM: Caching artifacts
11:49:39 PM: Started saving node modules
11:49:39 PM: Finished saving node modules
11:49:39 PM: Started saving build plugins
11:49:39 PM: Finished saving build plugins
11:49:39 PM: Started saving pip cache
11:49:39 PM: Finished saving pip cache
11:49:39 PM: Started saving emacs cask dependencies
11:49:39 PM: Finished saving emacs cask dependencies
11:49:39 PM: Started saving maven dependencies
11:49:39 PM: Finished saving maven dependencies
11:49:39 PM: Started saving boot dependencies
11:49:39 PM: Finished saving boot dependencies
11:49:39 PM: Started saving rust rustup cache
11:49:39 PM: Finished saving rust rustup cache
11:49:39 PM: Started saving go dependencies
11:49:39 PM: Finished saving go dependencies
11:49:40 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:49:40 PM: Creating deploy upload records
11:49:40 PM: Failing build: Failed to build site
11:49:40 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
11:49:40 PM: Finished processing build request in 24.962283961se here

Hey @michael-j-rubenstein

Seems there is an issue with an SVG file. Without seeing/testing myself I can only guess, but you might need to disable SVG minification as per this Parcel documentation.

Hey @coelmay

Sorry I was busy with work and hadn’t had a chance to respond.

I tried adding the htmlnanrc file to not minify svg elements but it still shows the same error message.

Without a public repository to test, it’s a little hard to offer further advice.

1 Like

Just changed it to public! you can find it here: GitHub - michael-j-rubenstein/website-practice-cloud-hosting

There is another thread regarding this issue. The simple fix is to downgrade parcel to 1.12.3 by running npm i -D parcel-bundler@1.12.3. This worked for me. Other options are to upgrade to parcel v2 though this may introduce other bugs (but also add more features perhaps.)

If you want to pin the version to avoid updating to 1.12.4 again (inadvertently) run npm i -DE parcel-bundler@1.12.3 which will pin this version.

2 Likes

Thank you so much!!! I downgraded to version 1.12.3 and it worked! Thank you!!!

2 Likes

Thanks for the excellent guidance, @coelmay. Glad everything is working now, @michael-j-rubenstein!!

Hi Hilary, I have the same problem here:
Build failed due to a user error: Build script returned non-zero exit code: 2
2:11:49 PM: build-image version: 9495be345de05eb8e91837e5d92c5afd0dbd65f6 (focal)
2:11:49 PM: buildbot version: 9495be345de05eb8e91837e5d92c5afd0dbd65f6
2:11:49 PM: Fetching cached dependencies
2:11:49 PM: Starting to download cache of 1.0GB
2:11:59 PM: Finished downloading cache in 9.766s
2:11:59 PM: Starting to extract cache
2:12:04 PM: Finished extracting cache in 5.404s
2:12:04 PM: Finished fetching cache in 15.267s
2:12:04 PM: Starting to prepare the repo for build
2:12:05 PM: Preparing Git Reference refs/heads/master
2:12:05 PM: Parsing package.json dependencies
2:12:06 PM: Starting build script
2:12:06 PM: Installing dependencies
2:12:06 PM: Python version set to 2.7
2:12:06 PM: Started restoring cached Node.js version
2:12:07 PM: Finished restoring cached Node.js version
2:12:08 PM: v12.18.0 is already installed.
2:12:08 PM: Now using node v12.18.0 (npm v6.14.4)
2:12:08 PM: Started restoring cached build plugins
2:12:08 PM: Finished restoring cached build plugins
2:12:08 PM: Attempting Ruby version 2.7.1, read from environment
2:12:08 PM: Started restoring cached Ruby version
2:12:08 PM: Finished restoring cached Ruby version
2:12:09 PM: Using Ruby version 2.7.1
2:12:09 PM: Using PHP version 8.0
2:12:09 PM: Started restoring cached corepack dependencies
2:12:09 PM: Finished restoring cached corepack dependencies
2:12:09 PM: Started restoring cached yarn cache
2:12:12 PM: Finished restoring cached yarn cache
2:12:13 PM: No yarn workspaces detected
2:12:13 PM: Started restoring cached node modules
2:12:13 PM: Finished restoring cached node modules
2:12:13 PM: Installing npm packages using Yarn version 1.22.4
2:12:13 PM: yarn install v1.22.4
2:12:13 PM: [1/4] Resolving packages…
2:12:14 PM: success Already up-to-date.
2:12:14 PM: Done in 0.66s.
2:12:14 PM: npm packages installed using Yarn
2:12:14 PM: Started restoring cached go cache
2:12:14 PM: Finished restoring cached go cache
2:12:14 PM: Installing Go version 1.14.4 (requested 1.14.4)
2:12:18 PM: go version go1.14.4 linux/amd64
2:12:18 PM: Detected 1 framework(s)
2:12:18 PM: “gatsby” at version “2.32.9”
2:12:18 PM: Installing missing commands
2:12:18 PM: Verify run directory
2:12:18 PM: Section completed: initializing
2:12:19 PM: ​
2:12:19 PM: Netlify Build
2:12:19 PM: ────────────────────────────────────────────────────────────────
2:12:19 PM: ​
2:12:19 PM: ❯ Version
2:12:19 PM: @netlify/build 29.5.4
2:12:19 PM: ​
2:12:19 PM: ❯ Flags
2:12:19 PM: baseRelDir: true
2:12:19 PM: buildId: 63e39f912edb571073989cca
2:12:19 PM: deployId: 63e39f91032af30008acf480
2:12:19 PM: ​
2:12:19 PM: ❯ Current directory
2:12:19 PM: /opt/build/repo
2:12:19 PM: ​
2:12:19 PM: ❯ Config file
2:12:19 PM: No config file was defined: using default values.
2:12:19 PM: ​
2:12:19 PM: ❯ Context
2:12:19 PM: production
2:12:19 PM: ​
2:12:19 PM: ❯ Loading plugins
2:12:19 PM: - @netlify/plugin-gatsby@1.0.3 from undefined
2:12:19 PM: ​
2:12:19 PM: ❯ Outdated plugins
2:12:19 PM: - @netlify/plugin-gatsby@1.0.3: latest version is 3.5.1
2:12:19 PM: Migration guide: Release v2.0.0 · netlify/netlify-plugin-gatsby · GitHub
2:12:19 PM: To upgrade this plugin, please remove it from “netlify.toml” and install it from the Netlify plugins directory instead (Netlify App)
2:12:21 PM: ​
2:12:21 PM: 1. @netlify/plugin-gatsby (onPreBuild event)
2:12:21 PM: ────────────────────────────────────────────────────────────────
2:12:21 PM: ​
2:12:23 PM: Found a Gatsby cache. We’re about to go FAST. :zap:
2:12:23 PM: Add gatsby-plugin-netlify to gatsby-config.js if you would like to support Gatsby redirects. :tada:
2:12:23 PM: ​
2:12:23 PM: (@netlify/plugin-gatsby onPreBuild completed in 2s)
2:12:23 PM: ​
2:12:23 PM: 2. Build command from Netlify app
2:12:23 PM: ────────────────────────────────────────────────────────────────
2:12:23 PM: ​
2:12:23 PM: $ yarn build
2:12:23 PM: yarn run v1.22.4
2:12:23 PM: $ gatsby build
2:12:25 PM: success open and validate gatsby-configs - 0.175s
2:12:26 PM: success load plugins - 0.657s
2:12:26 PM: success onPreInit - 0.023s
2:12:26 PM: success delete html and css files from previous builds - 0.027s
2:12:26 PM: success initialize cache - 0.003s
2:12:26 PM: success copy gatsby files - 0.026s
2:12:26 PM: success onPreBootstrap - 0.008s
2:12:26 PM: success gatsby-source-wordpress ensuring plugin requirements are met - 0.002s
2:12:27 PM: success gatsby-source-wordpress diff schemas - 0.530s
2:12:27 PM: success gatsby-source-wordpress ingest WPGraphQL schema - 0.609s
2:12:27 PM: success createSchemaCustomization - 0.633s
2:12:28 PM: success gatsby-source-wordpress fetch root fields - 0.642s
2:12:28 PM: ⠀
2:12:28 PM: info gatsby-source-wordpress update book Me, Judas… (#5282)
2:12:28 PM: ⠀
2:12:28 PM: ⠀
2:12:28 PM: info gatsby-source-wordpress update book Me, Satan… (#5280)
2:12:28 PM: ⠀
2:12:29 PM: ⠀
2:12:29 PM: info gatsby-source-wordpress update book Me, Judith… (#5276)
2:12:29 PM: ⠀
2:12:29 PM: ⠀
2:12:29 PM: info gatsby-source-wordpress update book Me, Icarus… (#5274)
2:12:29 PM: ⠀
2:12:30 PM: ⠀
2:12:30 PM: info gatsby-source-wordpress update book Me, Eve… (#5272)
2:12:30 PM: ⠀
2:12:30 PM: ⠀
2:12:30 PM: info gatsby-source-wordpress update book Carscape (#5270)
2:12:30 PM: ⠀
2:12:31 PM: ⠀
2:12:31 PM: info gatsby-source-wordpress update book A portrait of Simonetta Vespucci (#5267)
2:12:31 PM: ⠀
2:12:31 PM: ⠀
2:12:31 PM: info gatsby-source-wordpress update book Deposition from the cross (#5265)
2:12:31 PM: ⠀
2:12:32 PM: ⠀
2:12:32 PM: info gatsby-source-wordpress update book The Death of Marat (#5263)
2:12:32 PM: ⠀
2:12:32 PM: ⠀
2:12:32 PM: info gatsby-source-wordpress update book San Romano battle (#5261)
2:12:32 PM: ⠀
2:12:33 PM: ⠀
2:12:33 PM: info gatsby-source-wordpress update book The Bolt (#5259)
2:12:33 PM: ⠀
2:12:33 PM: ⠀
2:12:33 PM: info gatsby-source-wordpress update book Vertumne (#5255)
2:12:33 PM: ⠀
2:12:34 PM: ⠀
2:12:34 PM: info gatsby-source-wordpress update book Tales & legends of the dog (#5202)
2:12:34 PM: ⠀
2:12:34 PM: ⠀
2:12:34 PM: ⠀
2:12:34 PM: info gatsby-source-wordpress update book There is no age to change the world (#5176)
2:12:34 PM: ⠀
2:12:34 PM: ⠀
2:12:35 PM: ⠀
2:12:35 PM: info gatsby-source-wordpress update book Animals (#5187)
2:12:35 PM: ⠀
2:12:35 PM: ⠀
2:12:35 PM: ⠀
2:12:35 PM: info gatsby-source-wordpress update book I can roll my tongue, can you ? (#5181)
2:12:35 PM: ⠀
2:12:35 PM: ⠀
2:12:36 PM: ⠀
2:12:36 PM: info gatsby-source-wordpress update book Space (#5177)
2:12:36 PM: ⠀
2:12:36 PM: ⠀
2:12:36 PM: ⠀
2:12:36 PM: info gatsby-source-wordpress update book Pyrenean Women (#5160)
2:12:36 PM: ⠀
2:12:36 PM: ⠀
2:12:37 PM: ⠀
2:12:37 PM: info gatsby-source-wordpress update book On the borders of the wondrous (#5158)
2:12:37 PM: ⠀
2:12:37 PM: ⠀
2:12:37 PM: info title changed
2:12:37 PM: ⠀
2:12:37 PM: from
2:12:37 PM: The marvelous in the Middle Ages
2:12:37 PM: to
2:12:37 PM: On the borders of the wondrous
2:12:37 PM: ⠀
2:12:37 PM: ⠀
2:12:37 PM: ⠀
2:12:37 PM: info gatsby-source-wordpress update book Geopolitics of cinema (#5152)
2:12:37 PM: ⠀
2:12:37 PM: ⠀
2:12:38 PM: ⠀
2:12:38 PM: info gatsby-source-wordpress update book Comparative anatomy of imaginary species (#5150)
2:12:38 PM: ⠀
2:12:38 PM: ⠀
2:12:38 PM: ⠀
2:12:38 PM: info gatsby-source-wordpress update user Cristina Chiarasini (#2)
2:12:38 PM: ⠀
2:12:38 PM: ⠀
2:12:39 PM: ⠀
2:12:39 PM: info gatsby-source-wordpress update book Me, Oedipus… (#4417)
2:12:39 PM: ⠀
2:12:39 PM: ⠀
2:12:39 PM: ⠀
2:12:39 PM: info gatsby-source-wordpress update book Me, Venus… (#4421)
2:12:39 PM: ⠀
2:12:39 PM: ⠀
2:12:40 PM: ⠀
2:12:40 PM: info gatsby-source-wordpress create mediaItem Empereur des alchimistes (#5256)
2:12:40 PM: ⠀
2:12:40 PM: ⠀
2:12:40 PM: info gatsby-source-wordpress deleted mediaItem Contes-et-legendes-du-coq-et-de-la-poule (#5205)
2:12:40 PM: ⠀
2:12:42 PM: ⠀
2:12:42 PM: info gatsby-source-wordpress create mediaItem Me Judas (#5252)
2:12:42 PM: ⠀
2:12:43 PM: ⠀
2:12:43 PM: info gatsby-source-wordpress create mediaItem Le mystère Simonetta (#5250)
2:12:43 PM: ⠀
2:12:44 PM: ⠀
2:12:44 PM: info gatsby-source-wordpress create mediaItem Parking de Pompéi (#5248)
2:12:44 PM: ⠀
2:12:46 PM: ⠀
2:12:46 PM: info gatsby-source-wordpress create mediaItem Me, Satan… (#5246)
2:12:46 PM: ⠀
2:12:46 PM: success gatsby-source-wordpress pull updates since last build - 18.644s
2:12:46 PM: success Downloading remote files - 5.859s - 5/5 0.85/s
2:12:46 PM: success Checking for changed pages - 0.000s
2:12:46 PM: success source and transform nodes - 18.707s
2:12:46 PM: success building schema - 0.456s
2:12:50 PM: info Total nodes: 1603, SitePage nodes: 303 (use --verbose for breakdown)
2:12:50 PM: success createPages - 4.439s
2:12:50 PM: success Checking for changed pages - 0.000s
2:12:50 PM: success createPagesStatefully - 0.052s
2:12:50 PM: success Cleaning up stale page-data - 0.008s
2:12:51 PM: success update schema - 0.085s
2:12:51 PM: success onPreExtractQueries - 0.000s
2:12:51 PM: success extract queries from components - 0.683s
2:12:51 PM: success write out redirect data - 0.002s
2:12:51 PM: warning The icon(src/assets/images/gatsby-icon.png) you provided to ‘gatsby-plugin-manifest’ is not square.
2:12:51 PM: The icons we generate will be square and for the best results we recommend you provide a square icon.
2:12:52 PM: success Build manifest and related icons - 0.720s
2:12:52 PM: success onPostBootstrap - 0.778s
2:12:52 PM: info bootstrap finished - 29.074s
2:12:52 PM: error Failed to retrieve metadata from image /opt/build/repo/.cache/caches/gatsby-source-wordpress-experimental/cd7ed2334eb1ee632661d7f3f49d8550/Rights-representation-for-Spanish-Romanian-and-French-languages…png
2:12:52 PM:
2:12:52 PM:
2:12:52 PM: Error: Input file is missing
2:12:52 PM:
2:12:52 PM: not finished Generating image thumbnails - 5.578s
2:12:52 PM: not finished run static queries - 0.089s
2:12:52 PM: error Command failed with exit code 1. (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
2:12:52 PM: info Visit yarn run | Yarn for documentation about this command.
2:12:52 PM: ​
2:12:52 PM: “build.command” failed
2:12:52 PM: ────────────────────────────────────────────────────────────────
2:12:52 PM: ​
2:12:52 PM: Error message
2:12:52 PM: Command failed with exit code 1: yarn build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
2:12:52 PM: ​
2:12:52 PM: Error location
2:12:52 PM: In Build command from Netlify app:
2:12:52 PM: yarn build
2:12:52 PM: ​
2:12:52 PM: Resolved config
2:12:52 PM: build:
2:12:52 PM: command: yarn build
2:12:52 PM: commandOrigin: ui
2:12:52 PM: environment:
2:12:52 PM: - INCOMING_HOOK_BODY
2:12:52 PM: - INCOMING_HOOK_TITLE
2:12:52 PM: - INCOMING_HOOK_URL
2:12:52 PM: publish: /opt/build/repo/public
2:12:52 PM: publishOrigin: ui
2:12:52 PM: plugins:
2:12:52 PM: - inputs: {}
2:12:52 PM: package: ‘@netlify/plugin-gatsby’
2:12:53 PM: Caching artifacts
2:12:53 PM: Started saving node modules
2:12:53 PM: Finished saving node modules
2:12:53 PM: Started saving build plugins
2:12:53 PM: Finished saving build plugins
2:12:53 PM: Started saving corepack cache
2:12:53 PM: Finished saving corepack cache
2:12:53 PM: Started saving yarn cache
2:12:59 PM: Finished saving yarn cache
2:12:59 PM: Started saving pip cache
2:12:59 PM: Finished saving pip cache
2:12:59 PM: Started saving emacs cask dependencies
2:12:59 PM: Finished saving emacs cask dependencies
2:12:59 PM: Started saving maven dependencies
2:12:59 PM: Finished saving maven dependencies
2:12:59 PM: Started saving boot dependencies
2:12:59 PM: Finished saving boot dependencies
2:12:59 PM: Started saving rust rustup cache
2:12:59 PM: Finished saving rust rustup cache
2:13:00 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)
2:12:59 PM: Started saving go dependencies
2:12:59 PM: Finished saving go dependencies
2:12:59 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:12:59 PM: Failing build: Failed to build site
2:13:00 PM: Finished processing build request in 1m10.957s

Is there anything I can do to make builds work again? I have already three failed builds.
Thanks so much for your help.

With all good wishes,

Cristina

Hi @Agence_litt a few things I’m seeing in your deploy log.

  • You are using an outdated plugin of gatsby… can you use the latest version by removing it from netlify.toml then install it from the directory.
  • Does your build work locally? If it does not you need to get it working locally FIRST.
  • Did you read this support guide to try and debug first?

Hi Sam, thanks for your swift reply. I have quickly looked at what I could do on my side but could not find the answer. I have pushed some builds last Monday and all was alright, do not understand what has happened since ! If you have other ideas, I’d love to read ! Thank you, Cristina

Hello again Sam,
Looking closely at the log errors, I could see there was something related to a png image, which I found and deleted. It still does not work and I get the following:

10:59:19 PM: warning The icon(src/assets/images/gatsby-icon.png) you provided to ‘gatsby-plugin-manifest’ is not square.
10:59:19 PM: The icons we generate will be square and for the best results we recommend you provide a square icon.
10:59:19 PM: success Build manifest and related icons - 0.667s
10:59:19 PM: success onPostBootstrap - 0.722s
10:59:19 PM: info bootstrap finished - 64.583s
10:59:20 PM: success run static queries - 1.023s - 1/1 0.98/s
10:59:21 PM: success run page queries - 0.445s - 14/14 31.49/s
10:59:21 PM: success write out requires - 0.004s
10:59:21 PM: warning Browserslist: caniuse-lite is outdated. Please run:
10:59:21 PM: npx browserslist@latest --update-db
10:59:21 PM: Why you should do it regularly:
10:59:21 PM: GitHub - browserslist/browserslist: 🦔 Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env
10:59:28 PM: warning chunk styles [mini-css-extract-plugin]
10:59:28 PM: Conflicting order. Following module has been added:
10:59:28 PM: * css ./node_modules/css-loader??ref–13-oneOf-1-1!./node_modules/postcss-loader/src??postcss-3!./node_modules/sass-loader/dist/cjs.js??ref–13-oneOf-1-3!./src/assets/scss/components/_categoriesList.scss
10:59:28 PM: despite it was not able to fulfill desired ordering with these modules:
10:59:28 PM: * css ./node_modules/css-loader??ref–13-oneOf-1-1!./node_modules/postcss-loader/src??postcss-3!./node_modules/sass-loader/dist/cjs.js??ref–13-oneOf-1-3!./src/assets/scss/components/_bookCard.scss
10:59:28 PM: - couldn’t fulfill desired order of chunk group(s) component—src-pages-books-jswarning chunk styles [mini-css-extract-plugin]
10:59:28 PM: Conflicting order. Following module has been added:
10:59:28 PM: * css ./node_modules/css-loader??ref–13-oneOf-1-1!./node_modules/postcss-loader/src??postcss-3!./node_modules/sass-loader/dist/cjs.js??ref–13-oneOf-1-3!./src/assets/scss/components/_selectTags.scss
10:59:28 PM: despite it was not able to fulfill desired ordering with these modules:
10:59:28 PM: * css ./node_modules/css-loader??ref–13-oneOf-1-1!./node_modules/postcss-loader/src??postcss-3!./node_modules/sass-loader/dist/cjs.js??ref–13-oneOf-1-3!./src/assets/scss/components/_bookCard.scss
10:59:28 PM: - couldn’t fulfill desired order of chunk group(s) component—src-pages-books-jswarning chunk styles [mini-css-extract-plugin]
10:59:28 PM: Conflicting order. Following module has been added:
10:59:28 PM: * css ./node_modules/css-loader??ref–13-oneOf-1-1!./node_modules/postcss-loader/src??postcss-3!./node_modules/sass-loader/dist/cjs.js??ref–13-oneOf-1-3!./src/assets/scss/components/_catalog.scss
10:59:28 PM: despite it was not able to fulfill desired ordering with these modules:
10:59:28 PM: * css ./node_modules/css-loader??ref–13-oneOf-1-1!./node_modules/postcss-loader/src??postcss-3!./node_modules/sass-loader/dist/cjs.js??ref–13-oneOf-1-3!./src/assets/scss/components/_bookCard.scss
10:59:28 PM: - couldn’t fulfill desired order of chunk group(s) component—src-pages-books-jssuccess Building production JavaScript and CSS bundles - 6.972s
10:59:29 PM: success Building HTML renderer - 0.799s
10:59:30 PM: failed Building static HTML for pages - 0.455s
10:59:30 PM: error Building static HTML failed for path “/books/me-judith”
10:59:30 PM:
10:59:30 PM: 33 | <div className={‘sticky’}>
10:59:30 PM: 34 | {featuredImage && (
10:59:30 PM: > 35 |
10:59:30 PM: | ^
10:59:30 PM: 36 | )}
10:59:30 PM: 37 |
10:59:30 PM: 38 |
10:59:30 PM:
10:59:30 PM: WebpackError: TypeError: Cannot read property ‘localFile’ of null
10:59:30 PM:
10:59:30 PM: - book.js:35
10:59:30 PM: src/pages/templates/book.js:35:52
10:59:30 PM:
10:59:30 PM:
10:59:30 PM: not finished Generating image thumbnails - 16.529s
10:59:30 PM: error Command failed with exit code 1. (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
10:59:30 PM: info Visit yarn run | Yarn for documentation about this command.
10:59:30 PM: events.js:292
10:59:30 PM: throw er; // Unhandled ‘error’ event
10:59:30 PM: ^
10:59:30 PM: Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
10:59:30 PM: at process.target.send (internal/child_process.js:679:16)
10:59:30 PM: at reportSuccess (/opt/build/repo/node_modules/jest-worker/build/workers/processChild.js:83:11)
10:59:30 PM: at tryCatcher (/opt/build/repo/node_modules/bluebird/js/release/util.js:16:23)
10:59:30 PM: at Promise._settlePromiseFromHandler (/opt/build/repo/node_modules/bluebird/js/release/promise.js:547:31)
10:59:30 PM: at Promise._settlePromise (/opt/build/repo/node_modules/bluebird/js/release/promise.js:604:18)
10:59:30 PM: at Promise._settlePromise0 (/opt/build/repo/node_modules/bluebird/js/release/promise.js:649:10)
10:59:30 PM: at Promise._settlePromises (/opt/build/repo/node_modules/bluebird/js/release/promise.js:729:18)
10:59:30 PM: at Promise._fulfill (/opt/build/repo/node_modules/bluebird/js/release/promise.js:673:18)
10:59:30 PM: at MappingPromiseArray.PromiseArray._resolve (/opt/build/repo/node_modules/bluebird/js/release/promise_array.js:127:19)
10:59:30 PM: at MappingPromiseArray._promiseFulfilled (/opt/build/repo/node_modules/bluebird/js/release/map.js:108:18)
10:59:30 PM: at Promise._settlePromise (/opt/build/repo/node_modules/bluebird/js/release/promise.js:609:26)
10:59:30 PM: at Promise._settlePromise0 (/opt/build/repo/node_modules/bluebird/js/release/promise.js:649:10)
10:59:30 PM: at Promise._settlePromises (/opt/build/repo/node_modules/bluebird/js/release/promise.js:729:18)
10:59:30 PM: at _drainQueueStep (/opt/build/repo/node_modules/bluebird/js/release/async.js:93:12)
10:59:30 PM: at _drainQueue (/opt/build/repo/node_modules/bluebird/js/release/async.js:86:9)
10:59:30 PM: at Async._drainQueues (/opt/build/repo/node_modules/bluebird/js/release/async.js:102:5)
10:59:30 PM: Emitted ‘error’ event on process instance at:
10:59:30 PM: at internal/child_process.js:683:35
10:59:30 PM: at processTicksAndRejections (internal/process/task_queues.js:79:11) {
10:59:30 PM: code: ‘ERR_IPC_CHANNEL_CLOSED’
10:59:30 PM: }
10:59:30 PM: ​
10:59:30 PM: “build.command” failed
10:59:30 PM: ────────────────────────────────────────────────────────────────
10:59:30 PM: ​
10:59:30 PM: Error message
10:59:30 PM: Command failed with exit code 1: yarn build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
10:59:30 PM: ​
10:59:30 PM: Error location
10:59:30 PM: In Build command from Netlify app:
10:59:30 PM: yarn build
10:59:30 PM: ​
10:59:30 PM: Resolved config
10:59:30 PM: build:
10:59:30 PM: command: yarn build
10:59:30 PM: commandOrigin: ui
10:59:30 PM: environment:
10:59:30 PM: - INCOMING_HOOK_BODY
10:59:30 PM: - INCOMING_HOOK_TITLE
10:59:30 PM: - INCOMING_HOOK_URL
10:59:30 PM: publish: /opt/build/repo/public
10:59:30 PM: publishOrigin: ui
10:59:30 PM: plugins:
10:59:30 PM: - inputs: {}
10:59:30 PM: package: ‘@netlify/plugin-gatsby’
10:59:30 PM: Caching artifacts
10:59:30 PM: Started saving node modules
10:59:30 PM: Finished saving node modules
10:59:30 PM: Started saving build plugins
10:59:30 PM: Finished saving build plugins
10:59:30 PM: Started saving corepack cache
10:59:30 PM: Finished saving corepack cache
10:59:30 PM: Started saving yarn cache
10:59:33 PM: Finished saving yarn cache
10:59:33 PM: Started saving pip cache
10:59:33 PM: Finished saving pip cache
10:59:33 PM: Started saving emacs cask dependencies
10:59:33 PM: Finished saving emacs cask dependencies
10:59:33 PM: Started saving maven dependencies
10:59:33 PM: Finished saving maven dependencies
10:59:33 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)
10:59:33 PM: Started saving boot dependencies
10:59:33 PM: Finished saving boot dependencies
10:59:33 PM: Started saving rust rustup cache
10:59:33 PM: Finished saving rust rustup cache
10:59:33 PM: Started saving go dependencies
10:59:33 PM: Finished saving go dependencies
10:59:33 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:59:33 PM: Failing build: Failed to build site
10:59:33 PM: Finished processing build request in 1m48.848s

Hi @Agence_litt,

Based on your recent deploys, it appears you’ve solved the issue. Do you still need help?