Kundi
August 25, 2023, 8:02am
1
Hi!
Our builds stopped working yesterday and this is the build log:
9:51:21 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
9:51:09 AM: Netlify Build
9:51:09 AM: ────────────────────────────────────────────────────────────────
9:51:09 AM:
9:51:09 AM: ❯ Version
9:51:09 AM: @netlify/build 29.20.6
9:51:09 AM:
9:51:09 AM: ❯ Flags
9:51:09 AM: baseRelDir: true
9:51:09 AM: buildId: 64e85d1f301c14000879df6a
9:51:09 AM: deployId: 64e85d1f301c14000879df6c
9:51:09 AM:
9:51:09 AM: ❯ Current directory
9:51:09 AM: /opt/build/repo
9:51:09 AM:
9:51:09 AM: ❯ Config file
9:51:09 AM: /opt/build/repo/netlify.toml
9:51:09 AM:
9:51:09 AM: ❯ Context
9:51:09 AM: deploy-preview
9:51:09 AM:
9:51:09 AM: Dependencies installation error
9:51:09 AM: ────────────────────────────────────────────────────────────────
9:51:09 AM:
9:51:09 AM: Error message
9:51:09 AM: Error while installing dependencies in /opt/build/repo/.netlify/plugins/
9:51:09 AM: npm ERR! cb.apply is not a function
9:51:09 AM:
9:51:09 AM: Resolved config
9:51:09 AM: build:
9:51:09 AM: command: ember build --environment=production
9:51:09 AM: commandOrigin: config
9:51:09 AM: environment:
9:51:09 AM: - REVIEW_ID
9:51:09 AM: - DEPLOY_TARGET
9:51:09 AM: - NODE_VERSION
9:51:09 AM: - NPM_VERSION
9:51:09 AM: - API_URL
9:51:09 AM: - API_TASK_URL
9:51:09 AM: - FAYE_URL
9:51:09 AM: - SHARING_PAGES_URL
9:51:09 AM: - STRIPE_SIGNUP
9:51:09 AM: - ROLLBAR_TOKEN
9:51:09 AM: - STRIPE_PUBLISHABLE_KEY
9:51:09 AM: - GOOGLE_OAUTH_CLIENT_ID
9:51:09 AM: ignore: git log -1 --pretty=%B | grep dependabot
9:51:09 AM: publish: /opt/build/repo/dist
9:51:09 AM: publishOrigin: config
9:51:09 AM: redirects:
9:51:21 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:51:21 AM: Failing build: Failed to build site
9:51:21 AM: Finished processing build request in 1m28.156s
We are using yarn as package manager and all dependencies are getting installed successfully in previous step.
We do not use any plugins, but this log is pointing out that error is:
Error while installing dependencies in /opt/build/repo/.netlify/plugins/
We tried different node versions, currently we are using version 18, but error is still present.
If anyone has similar issue or can point us out to the solution would be really nice.
Thanks in advance!
1 Like
Hi @Kundi ,
We’ve escalated this to the devs.
Hi @hrishikesh ,
We’re experiencing the same problem. Do you have any updates regarding this issue?
Any Pull request to follow ?
Thank you.
Same here, it started today on one of our apps (site id: 39fa173b-1ff0-444e-8c5b-6db1ddc0d332)
I’ve got the same issue. The code that was deployed 3 weeks ago, today returns a build error.
10:56:17 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
10:54:46 AM: build-image version: 6cae66f783f2b7ff8e3a9cdbb5031761f0b47719 (focal)
10:54:46 AM: buildbot version: cb74d097ea8f76bcaa16d435b6bf29d5a1715ede
10:54:46 AM: Building without cache
10:54:46 AM: Starting to prepare the repo for build
10:54:46 AM: No cached dependencies found. Cloning fresh repo
10:54:46 AM: git clone --filter=blob:none https://github.com/CallistoEnterprise/bridge-soy-finance
10:54:47 AM: Preparing Git Reference refs/heads/main
10:54:49 AM: Starting to install dependencies
10:54:49 AM: Python version set to 3.8
10:54:49 AM: Attempting Ruby version 2.7.2, read from environment
10:54:49 AM: Using Ruby version 2.7.2
10:54:50 AM: Started restoring cached go cache
10:54:50 AM: Finished restoring cached go cache
10:54:50 AM: Installing Go version 1.16.5 (requested 1.16.5)
10:54:54 AM: go version go1.16.5 linux/amd64
10:54:54 AM: Using PHP version 8.0
10:54:55 AM: Downloading and installing node v16.20.2...
10:54:55 AM: Downloading https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-x64.tar.xz...
10:54:55 AM: Computing checksum with sha256sum
10:54:56 AM: Checksums matched!
10:54:57 AM: Now using node v16.20.2 (npm v8.19.4)
10:54:57 AM: Enabling Node.js Corepack
10:54:58 AM: Started restoring cached build plugins
10:54:58 AM: Finished restoring cached build plugins
10:54:58 AM: Started restoring cached corepack dependencies
10:54:58 AM: Finished restoring cached corepack dependencies
10:54:58 AM: Started restoring cached yarn cache
10:54:58 AM: Finished restoring cached yarn cache
10:54:58 AM: Installing Yarn version 1.22.10
10:54:58 AM: Preparing yarn@1.22.10 for immediate activation...
10:54:58 AM: No yarn workspaces detected
10:54:58 AM: Started restoring cached node modules
10:54:58 AM: Finished restoring cached node modules
10:54:58 AM: Installing npm packages using Yarn version 1.22.10
10:54:59 AM: yarn install v1.22.10
10:54:59 AM: warning package.json: License should be a valid SPDX license expression
10:54:59 AM: warning soy.finance.bridge@0.0.1: License should be a valid SPDX license expression
10:54:59 AM: [1/4] Resolving packages...
10:55:00 AM: [2/4] Fetching packages...
10:55:24 AM: info fsevents@2.3.2: The platform linux is incompatible with this module.
10:55:24 AM: info fsevents@2.3.2 is an optional dependency and failed compatibility check. Excluding it from installation.
10:55:24 AM: info fsevents@1.2.13: The platform linux is incompatible with this module.
10:55:24 AM: info fsevents@1.2.13 is an optional dependency and failed compatibility check. Excluding it from installation.
10:55:24 AM: [3/4] Linking dependencies...
10:55:24 AM: warning > @callisto-enterprise/soy-sdk@0.1.7 has unmet peer dependency @ethersproject/address@^5.4.0.
10:55:24 AM: warning > @callisto-enterprise/soy-sdk@0.1.7 has unmet peer dependency @ethersproject/contracts@^5.4.0.
10:55:24 AM: warning > @callisto-enterprise/soy-sdk@0.1.7 has unmet peer dependency @ethersproject/networks@^5.4.0.
10:55:24 AM: warning > @callisto-enterprise/soy-sdk@0.1.7 has unmet peer dependency @ethersproject/providers@^5.4.0.
10:55:24 AM: warning > @callisto-enterprise/soy-sdk@0.1.7 has unmet peer dependency @ethersproject/solidity@^5.4.0.
10:55:24 AM: warning > @callisto-enterprise/soy-uikit2@0.3.8 has incorrect peer dependency react-router-dom@^5.2.0.
10:55:24 AM: warning > bootstrap@5.1.3 has unmet peer dependency @popperjs/core@^2.10.2.
10:55:24 AM: warning eth-block-timestamp > @testing-library/user-event@7.2.1 has unmet peer dependency @testing-library/dom@>=5.
10:55:24 AM: warning > react-hookstore@1.5.2 has incorrect peer dependency react@^16.8.0.
10:55:24 AM: warning > styled-components@5.3.5 has unmet peer dependency react-is@>= 16.8.0.
10:55:24 AM: warning > web3-react@5.0.5 has incorrect peer dependency ethers@^4.
10:55:24 AM: warning > web3-react@5.0.5 has incorrect peer dependency react@^16.8.
10:55:24 AM: warning > web3-react@5.0.5 has incorrect peer dependency react-dom@^16.8.
10:55:24 AM: warning web3-react > @0x/subproviders > eth-lightwallet > bitcore-mnemonic@1.7.0 has incorrect peer dependency bitcore-lib@^0.16.0.
10:55:24 AM: warning > craco-style-resources-loader@1.1.2 has incorrect peer dependency react-scripts@^5.0.0.
10:55:24 AM: warning > craco-style-resources-loader@1.1.2 has unmet peer dependency webpack@^4.0.0.
10:55:24 AM: warning craco-style-resources-loader > style-resources-loader@1.5.0 has unmet peer dependency webpack@^3.0.0 || ^4.0.0 || ^5.0.0.
10:55:24 AM: warning > eslint-config-react-app@6.0.0 has incorrect peer dependency @typescript-eslint/eslint-plugin@^4.0.0.
10:55:24 AM: warning > eslint-config-react-app@6.0.0 has incorrect peer dependency @typescript-eslint/parser@^4.0.0.
10:55:24 AM: warning > eslint-config-react-app@6.0.0 has unmet peer dependency babel-eslint@^10.0.0.
10:55:24 AM: warning > postcss-loader@5.3.0 has unmet peer dependency webpack@^5.0.0.
10:55:24 AM: warning > purgecss-webpack-plugin@4.1.3 has unmet peer dependency webpack@*.
10:55:24 AM: warning > terser-webpack-plugin@4.2.3 has unmet peer dependency webpack@^4.0.0 || ^5.0.0.
10:55:24 AM: warning > ts-jest@27.1.5 has unmet peer dependency jest@^27.0.0.
10:55:58 AM: warning abbrev@1.1.0: Invalid bin field for abbrev.
10:55:58 AM: warning ansicolors@0.3.2: Invalid bin field for ansicolors.
10:55:58 AM: warning ansistyles@0.1.3: Invalid bin field for ansistyles.
10:55:58 AM: warning archy@1.0.0: Invalid bin field for archy.
10:55:58 AM: warning call-limit@1.1.0: Invalid bin field for call-limit.
10:55:58 AM: warning bluebird@3.5.0: Invalid bin field for bluebird.
10:55:58 AM: warning chownr@1.0.1: Invalid bin field for chownr.
10:55:58 AM: warning cmd-shim@2.0.2: Invalid bin field for cmd-shim.
10:55:58 AM: warning columnify@1.5.4: Invalid bin field for columnify.
10:55:58 AM: warning config-chain@1.1.11: Invalid bin field for config-chain.
10:55:58 AM: warning debuglog@1.0.1: Invalid bin field for debuglog.
10:55:58 AM: warning detect-indent@5.0.0: Invalid bin field for detect-indent.
10:55:58 AM: warning dezalgo@1.0.3: Invalid bin field for dezalgo.
10:55:58 AM: warning editor@1.0.0: Invalid bin field for editor.
10:55:58 AM: warning fs-vacuum@1.2.10: Invalid bin field for fs-vacuum.
10:55:58 AM: warning fs-write-stream-atomic@1.0.10: Invalid bin field for fs-write-stream-atomic.
10:55:58 AM: warning fstream@1.0.11: Invalid bin field for fstream.
10:55:58 AM: warning graceful-fs@4.1.11: Invalid bin field for graceful-fs.
10:55:58 AM: warning has-unicode@2.0.1: Invalid bin field for has-unicode.
10:55:58 AM: warning iferr@0.1.5: Invalid bin field for iferr.
10:55:58 AM: warning imurmurhash@0.1.4: Invalid bin field for imurmurhash.
10:55:58 AM: warning inflight@1.0.6: Invalid bin field for inflight.
10:55:58 AM: warning inherits@2.0.3: Invalid bin field for inherits.
10:55:58 AM: warning ini@1.3.4: Invalid bin field for ini.
10:55:58 AM: warning init-package-json@1.10.1: Invalid bin field for init-package-json.
10:55:58 AM: warning lazy-property@1.0.0: Invalid bin field for lazy-property.
10:55:58 AM: warning lockfile@1.0.3: Invalid bin field for lockfile.
10:55:58 AM: warning lodash._baseindexof@3.1.0: Invalid bin field for lodash._baseindexof.
10:55:58 AM: warning lodash._baseuniq@4.6.0: Invalid bin field for lodash._baseuniq.
10:55:58 AM: warning lodash._bindcallback@3.0.1: Invalid bin field for lodash._bindcallback.
10:55:58 AM: warning lodash._cacheindexof@3.0.2: Invalid bin field for lodash._cacheindexof.
10:55:58 AM: warning lodash._createcache@3.1.2: Invalid bin field for lodash._createcache.
10:55:58 AM: warning lodash._getnative@3.9.1: Invalid bin field for lodash._getnative.
10:55:58 AM: warning lodash.clonedeep@4.5.0: Invalid bin field for lodash.clonedeep.
10:55:58 AM: warning lodash.restparam@3.6.1: Invalid bin field for lodash.restparam.
10:55:58 AM: warning lodash.union@4.6.0: Invalid bin field for lodash.union.
10:55:58 AM: warning lodash.uniq@4.5.0: Invalid bin field for lodash.uniq.
10:55:58 AM: warning lodash.without@4.4.0: Invalid bin field for lodash.without.
10:55:58 AM: warning mississippi@1.3.0: Invalid bin field for mississippi.
10:55:58 AM: warning move-concurrently@1.0.1: Invalid bin field for move-concurrently.
10:55:58 AM: warning npm-cache-filename@1.0.2: Invalid bin field for npm-cache-filename.
10:55:58 AM: warning npm-install-checks@3.0.0: Invalid bin field for npm-install-checks.
10:55:58 AM: warning once@1.4.0: Invalid bin field for once.
10:55:58 AM: warning osenv@0.1.4: Invalid bin field for osenv.
10:55:58 AM: warning path-is-inside@1.0.2: Invalid bin field for path-is-inside.
10:55:58 AM: warning promise-inflight@1.0.1: Invalid bin field for promise-inflight.
10:55:58 AM: warning read@1.0.7: Invalid bin field for read.
10:55:58 AM: warning read-cmd-shim@1.0.1: Invalid bin field for read-cmd-shim.
10:55:58 AM: warning read-installed@4.0.3: Invalid bin field for read-installed.
10:55:58 AM: warning readdir-scoped-modules@1.0.2: Invalid bin field for readdir-scoped-modules.
10:55:58 AM: warning retry@0.10.1: Invalid bin field for retry.
10:55:58 AM: warning sha@2.0.1: Invalid bin field for sha.
10:55:58 AM: warning slide@1.1.6: Invalid bin field for slide.
10:55:58 AM: warning sorted-object@2.0.1: Invalid bin field for sorted-object.
10:55:58 AM: warning sorted-union-stream@2.1.3: Invalid bin field for sorted-union-stream.
10:55:58 AM: warning tar@2.2.1: Invalid bin field for tar.
10:55:58 AM: warning text-table@0.2.0: Invalid bin field for text-table.
10:55:58 AM: warning uid-number@0.0.6: Invalid bin field for uid-number.
10:55:58 AM: warning umask@1.1.0: Invalid bin field for umask.
10:55:58 AM: warning unique-filename@1.1.0: Invalid bin field for unique-filename.
10:55:58 AM: warning unpipe@1.0.0: Invalid bin field for unpipe.
10:55:58 AM: warning validate-npm-package-license@3.0.1: Invalid bin field for validate-npm-package-license.
10:55:58 AM: warning validate-npm-package-name@3.0.0: Invalid bin field for validate-npm-package-name.
10:55:58 AM: warning wrappy@1.0.2: Invalid bin field for wrappy.
10:55:58 AM: [4/4] Building fresh packages...
10:56:02 AM: warning Error running install script for optional dependency: /opt/build/repo/node_modules/node-hid: Command failed.
Exit code: 1
10:56:02 AM: Command: prebuild-install || node-gyp rebuild
10:56:02 AM: Arguments:
10:56:02 AM: Directory: /opt/build/repo/node_modules/node-hid
10:56:02 AM: Output:
10:56:02 AM: prebuild-install WARN install No prebuilt binaries found (target=16.20.2 runtime=node arch=x64 libc= platform=linux)
10:56:02 AM: gyp info it worked if it ends with ok
10:56:02 AM: gyp info using node-gyp@9.1.0
10:56:02 AM: gyp info using node@16.20.2 | linux | x64
10:56:02 AM: gyp info find Python using Python version 3.8.10 found at \/opt/buildhome/python3.8/bin/python3\
gyp info spawn /opt/buildhome/python3.8/bin/python3
10:56:02 AM: gyp info spawn args [
10:56:02 AM: gyp info spawn args '/opt/buildhome/.nvm/versions/node/v16.20.2/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
10:56:02 AM: gyp info spawn args 'binding.gyp',
10:56:02 AM: gyp info spawn args '-f',
10:56:02 AM: gyp info spawn args 'make',
10:56:02 AM: gyp info spawn args '-I',
10:56:02 AM: gyp info spawn args '/opt/build/repo/node_modules/node-hid/build/config.gypi',
10:56:02 AM: gyp info spawn args '-I',
10:56:02 AM: gyp info spawn args '/opt/buildhome/.nvm/versions/node/v16.20.2/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
10:56:02 AM: gyp info spawn args '-I',
10:56:02 AM: gyp info spawn args '/opt/buildhome/.cache/node-gyp/16.20.2/include/node/common.gypi',
10:56:02 AM: gyp info spawn args '-Dlibrary=shared_library',
10:56:02 AM: gyp info spawn args '-Dvisibility=default',
10:56:02 AM: gyp info spawn args '-Dnode_root_dir=/opt/buildhome/.cache/node-gyp/16.20.2',
10:56:02 AM: gyp info spawn args '-Dnode_gyp_dir=/opt/buildhome/.nvm/versions/node/v16.20.2/lib/node_modules/npm/node_modules/node-gyp',
10:56:02 AM: gyp info spawn args '-Dnode_lib_file=/opt/buildhome/.cache/node-gyp/16.20.2/<(target_arch)/node.lib',
10:56:02 AM: gyp info spawn args '-Dmodule_root_dir=/opt/build/repo/node_modules/node-hid',
10:56:02 AM: gyp info spawn args '-Dnode_engine=v8',
10:56:02 AM: gyp info spawn args '--depth=.',
10:56:02 AM: gyp info spawn args '--no-parallel',
10:56:02 AM: gyp info spawn args '--generator-output',
10:56:02 AM: gyp info spawn args 'build',
10:56:02 AM: gyp info spawn args '-Goutput_dir=.'
10:56:02 AM: gyp info spawn args ]
10:56:02 AM: gyp info spawn make
10:56:02 AM: gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
10:56:02 AM: ../hidapi/linux/hid.c:44:10: fatal error: libudev.h: No such file or directory
10:56:02 AM: 44 | #include <libudev.h>
10:56:02 AM: | ^~~~~~~~~~~
10:56:02 AM: compilation terminated.
10:56:02 AM: make: *** [hidapi-linux-hidraw.target.mk:113: Release/obj.target/hidapi-linux-hidraw/hidapi/linux/hid.o] Error 1
10:56:02 AM: gyp ERR! build error
10:56:02 AM: gyp ERR! stack Error: `make` failed with exit code: 2
10:56:02 AM: gyp ERR! stack at ChildProcess.onExit (/opt/buildhome/.nvm/versions/node/v16.20.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:201:23)
10:56:02 AM: gyp ERR! stack at ChildProcess.emit (node:events:513:28)
10:56:02 AM: gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
10:56:02 AM: gyp ERR! System Linux 5.10.186-179.751.amzn2.x86_64
10:56:02 AM: gyp ERR! command \/opt/buildhome/.nvm/versions/node/v16.20.2/bin/node\ \/opt/buildhome/.nvm/versions/node/v16.20.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\ \rebuild\
gyp ERR! cwd /opt/build/repo/node_modules/node-hid
10:56:02 AM: gyp ERR! node -v v16.20.2
10:56:02 AM: gyp ERR! node-gyp -v v9.1.0
10:56:02 AM: gyp ERR! not ok
10:56:02 AM: make: Entering directory '/opt/build/repo/node_modules/node-hid/build'
10:56:02 AM: CC(target) Release/obj.target/hidapi-linux-hidraw/hidapi/linux/hid.o
10:56:02 AM: make: Leaving directory '/opt/build/repo/node_modules/node-hid/build'
info This module is OPTIONAL, you can safely ignore this error
10:56:05 AM: Done in 66.61s.
10:56:05 AM: npm packages installed using Yarn
10:56:06 AM: Install dependencies script success
10:56:06 AM: Starting build script
10:56:07 AM: Detected 1 framework(s)
10:56:07 AM: create-react-app at version 4.0.3
10:56:07 AM: Section completed: initializing
10:56:08 AM:
10:56:08 AM: Netlify Build
10:56:08 AM: ────────────────────────────────────────────────────────────────
10:56:08 AM:
10:56:08 AM: ❯ Version
10:56:08 AM: @netlify/build 29.20.6
10:56:08 AM:
10:56:08 AM: ❯ Flags
10:56:08 AM: baseRelDir: true
10:56:08 AM: buildId: 64eef5c53e35f25468f3643f
10:56:08 AM: deployId: 64eef5c53e35f25468f36441
10:56:08 AM:
10:56:08 AM: ❯ Current directory
10:56:08 AM: /opt/build/repo
10:56:08 AM:
10:56:08 AM: ❯ Config file
10:56:08 AM: /opt/build/repo/netlify.toml
10:56:08 AM:
10:56:08 AM: ❯ Context
10:56:08 AM: production
10:56:09 AM:
10:56:09 AM: Dependencies installation error
10:56:09 AM: ────────────────────────────────────────────────────────────────
10:56:09 AM:
10:56:09 AM: Error message
10:56:09 AM: Error while installing dependencies in /opt/build/repo/.netlify/plugins/
10:56:09 AM: npm ERR! cb.apply is not a function
10:56:09 AM:
10:56:09 AM: Resolved config
10:56:09 AM: build:
10:56:09 AM: command: yarn build
10:56:09 AM: commandOrigin: ui
10:56:09 AM: publish: /opt/build/repo/build
10:56:09 AM: publishOrigin: ui
10:56:09 AM: redirects:
10:56:09 AM: - from: /*
status: 200
to: /
redirectsOrigin: config
Caching artifacts
10:56:09 AM: Started saving node modules
10:56:09 AM: Finished saving node modules
10:56:09 AM: Started saving build plugins
10:56:09 AM: Finished saving build plugins
10:56:09 AM: Started saving corepack cache
10:56:09 AM: Finished saving corepack cache
10:56:09 AM: Started saving yarn cache
10:56:16 AM: Finished saving yarn cache
10:56:16 AM: Started saving pip cache
10:56:16 AM: Finished saving pip cache
10:56:16 AM: Started saving emacs cask dependencies
10:56:16 AM: Finished saving emacs cask dependencies
10:56:16 AM: Started saving maven dependencies
10:56:16 AM: Finished saving maven dependencies
10:56:16 AM: Started saving boot dependencies
10:56:16 AM: Finished saving boot dependencies
10:56:16 AM: Started saving rust rustup cache
10:56:16 AM: Finished saving rust rustup cache
10:56:16 AM: Started saving go dependencies
10:56:16 AM: Finished saving go dependencies
10:56:17 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:56:17 AM: Failing build: Failed to build site
10:56:17 AM: Finished processing build request in 1m31.219s
This should now be fixed. Could you all please check?
Yes, it works now. Thank you
SamO
August 30, 2023, 7:59pm
11
Awesome! Glad to hear it.