CI = npm run build and it did not work

I tried changing the setting to CI = npm run build and it did not work

here is deploy logs

11:18:54 AM: Build ready to start
11:18:58 AM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
11:18:58 AM: build-image tag: v4.10.1
11:18:58 AM: buildbot version: 7e449fda4d95fa42451b88186ca7054116649237
11:18:58 AM: Fetching cached dependencies
11:18:58 AM: Failed to fetch cache, continuing with build
11:18:58 AM: Starting to prepare the repo for build
11:18:58 AM: No cached dependencies found. Cloning fresh repo
11:18:58 AM: git clone https://github.com/JuliusGoddard/greenpass
11:18:59 AM: Preparing Git Reference refs/heads/master
11:18:59 AM: Parsing package.json dependencies
11:19:00 AM: Starting build script
11:19:00 AM: Installing dependencies
11:19:00 AM: Python version set to 2.7
11:19:00 AM: Downloading and installing node v16.17.0...
11:19:00 AM: Downloading https://nodejs.org/dist/v16.17.0/node-v16.17.0-linux-x64.tar.xz...
11:19:01 AM: Computing checksum with sha256sum
11:19:01 AM: Checksums matched!
11:19:03 AM: Now using node v16.17.0 (npm v8.15.0)
11:19:03 AM: Started restoring cached build plugins
11:19:03 AM: Finished restoring cached build plugins
11:19:03 AM: Attempting ruby version 2.7.2, read from environment
11:19:03 AM: Using ruby version 2.7.2
11:19:04 AM: Using PHP version 8.0
11:19:04 AM: No npm workspaces detected
11:19:04 AM: Started restoring cached node modules
11:19:04 AM: Finished restoring cached node modules
11:19:04 AM: Installing NPM modules using NPM version 8.15.0
11:19:04 AM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
11:19:04 AM: npm WARN config location in the cache, and they are managed by
11:19:04 AM: npm WARN config     [`cacache`](http://npm.im/cacache).
11:19:04 AM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
11:19:04 AM: npm WARN config location in the cache, and they are managed by
11:19:04 AM: npm WARN config     [`cacache`](http://npm.im/cacache).
11:19:04 AM: npm WARN using --force Recommended protections disabled.
11:19:06 AM: npm WARN ERESOLVE overriding peer dependency
11:19:06 AM: npm WARN While resolving: react-qr-reader@3.0.0-beta-1
11:19:06 AM: npm WARN Found: react@18.2.0
11:19:06 AM: npm WARN node_modules/react
11:19:06 AM: npm WARN   react@"^18.2.0" from the root project
11:19:06 AM: npm WARN   11 more (@react-aria/ssr, @restart/hooks, @restart/ui, ...)
11:19:06 AM: npm WARN
11:19:06 AM: npm WARN Could not resolve dependency:
11:19:06 AM: npm WARN peer react@"^16.8.0 || ^17.0.0" from react-qr-reader@3.0.0-beta-1
11:19:06 AM: npm WARN node_modules/react-qr-reader
11:19:06 AM: npm WARN   react-qr-reader@"^3.0.0-beta-1" from the root project
11:19:06 AM: npm WARN
11:19:06 AM: npm WARN Conflicting peer dependency: react@17.0.2
11:19:06 AM: npm WARN node_modules/react
11:19:06 AM: npm WARN   peer react@"^16.8.0 || ^17.0.0" from react-qr-reader@3.0.0-beta-1
11:19:06 AM: npm WARN   node_modules/react-qr-reader
11:19:06 AM: npm WARN     react-qr-reader@"^3.0.0-beta-1" from the root project
11:19:06 AM: npm WARN ERESOLVE overriding peer dependency
11:19:06 AM: npm WARN While resolving: react-qr-reader@3.0.0-beta-1
11:19:06 AM: npm WARN Found: react-dom@18.2.0
11:19:06 AM: npm WARN node_modules/react-dom
11:19:06 AM: npm WARN   react-dom@"^18.2.0" from the root project
11:19:06 AM: npm WARN   5 more (@restart/ui, @testing-library/react, react-bootstrap, ...)
11:19:06 AM: npm WARN
11:19:06 AM: npm WARN Could not resolve dependency:
11:19:06 AM: npm WARN peer react-dom@"^16.8.0 || ^17.0.0" from react-qr-reader@3.0.0-beta-1
11:19:06 AM: npm WARN node_modules/react-qr-reader
11:19:06 AM: npm WARN   react-qr-reader@"^3.0.0-beta-1" from the root project
11:19:06 AM: npm WARN
11:19:06 AM: npm WARN Conflicting peer dependency: react-dom@17.0.2
11:19:06 AM: npm WARN node_modules/react-dom
11:19:06 AM: npm WARN   peer react-dom@"^16.8.0 || ^17.0.0" from react-qr-reader@3.0.0-beta-1
11:19:06 AM: npm WARN   node_modules/react-qr-reader
11:19:06 AM: npm WARN     react-qr-reader@"^3.0.0-beta-1" from the root project
11:19:10 AM: 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:19:11 AM: npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
11:19:12 AM: npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
11:19:13 AM: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
11:19:20 AM: added 1675 packages, and audited 1676 packages in 15s
11:19:20 AM: 239 packages are looking for funding
11:19:20 AM:   run `npm fund` for details
11:19:20 AM: 6 high severity vulnerabilities
11:19:20 AM: To address all issues (including breaking changes), run:
11:19:20 AM:   npm audit fix --force
11:19:20 AM: Run `npm audit` for details.
11:19:20 AM: NPM modules installed
11:19:20 AM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
11:19:20 AM: npm WARN config location in the cache, and they are managed by
11:19:20 AM: npm WARN config     [`cacache`](http://npm.im/cacache).
11:19:20 AM: Started restoring cached go cache
11:19:20 AM: Finished restoring cached go cache
11:19:20 AM: Installing Go version 1.17 (requested 1.17)
11:19:24 AM: unset GOOS;
11:19:25 AM: unset GOARCH;
11:19:25 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.17.linux.amd64';
11:19:25 AM: export PATH="/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}";
11:19:25 AM: go version >&2;
11:19:25 AM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.17.linux.amd64.env"
11:19:25 AM: go version go1.17 linux/amd64
11:19:25 AM: Installing missing commands
11:19:25 AM: Verify run directory
11:19:26 AM: ​
11:19:26 AM: ────────────────────────────────────────────────────────────────
11:19:26 AM:   Netlify Build                                                 
11:19:26 AM: ────────────────────────────────────────────────────────────────
11:19:26 AM: ​
11:19:26 AM: ❯ Version
11:19:26 AM:   @netlify/build 27.18.1
11:19:26 AM: ​
11:19:26 AM: ❯ Flags
11:19:26 AM:   baseRelDir: true
11:19:26 AM:   buildId: 63259f0e3cd2e029e96de84e
11:19:26 AM:   deployId: 63259f0e3cd2e029e96de850
11:19:26 AM: ​
11:19:26 AM: ❯ Current directory
11:19:26 AM:   /opt/build/repo
11:19:26 AM: ​
11:19:26 AM: ❯ Config file
11:19:26 AM:   No config file was defined: using default values.
11:19:26 AM: ​
11:19:26 AM: ❯ Context
11:19:26 AM:   production
11:19:26 AM: ​
11:19:26 AM: ────────────────────────────────────────────────────────────────
11:19:26 AM:   1. Build command from Netlify app                             
11:19:26 AM: ────────────────────────────────────────────────────────────────
11:19:26 AM: ​
11:19:26 AM: $ CI=npm run build
11:19:26 AM: bash: run: command not found
11:19:26 AM: ​
11:19:26 AM: ────────────────────────────────────────────────────────────────
11:19:26 AM:   "build.command" failed                                        
11:19:26 AM: ────────────────────────────────────────────────────────────────
11:19:26 AM: ​
11:19:26 AM:   Error message
11:19:26 AM:   Command failed with exit code 127: CI=npm run build (https://ntl.fyi/exit-code-127)
11:19:26 AM: ​
11:19:26 AM:   Error location
11:19:26 AM:   In Build command from Netlify app:
11:19:26 AM:   CI=npm run build
11:19:26 AM: ​
11:19:26 AM:   Resolved config
11:19:26 AM:   build:
11:19:26 AM:     command: CI=npm run build
11:19:26 AM:     commandOrigin: ui
11:19:26 AM:     environment:
11:19:26 AM:       - NPM_FLAGS
11:19:26 AM:     publish: /opt/build/repo/build
11:19:26 AM:     publishOrigin: ui
11:19:26 AM: Caching artifacts
11:19:26 AM: Started saving node modules
11:19:26 AM: Finished saving node modules
11:19:26 AM: Started saving build plugins
11:19:26 AM: Finished saving build plugins
11:19:26 AM: Started saving pip cache
11:19:26 AM: Finished saving pip cache
11:19:26 AM: Started saving emacs cask dependencies
11:19:26 AM: Finished saving emacs cask dependencies
11:19:26 AM: Started saving maven dependencies
11:19:26 AM: Finished saving maven dependencies
11:19:26 AM: Started saving boot dependencies
11:19:26 AM: Finished saving boot dependencies
11:19:26 AM: Started saving rust rustup cache
11:19:26 AM: Finished saving rust rustup cache
11:19:26 AM: Started saving go dependencies
11:19:26 AM: Finished saving go dependencies
11:19:29 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:19:29 AM: Creating deploy upload records
11:19:29 AM: Failing build: Failed to build site
11:19:29 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
11:19:29 AM: Finished processing build request in 31.132113426s

Could anyone advise ?

Hi @juliusgoddard

Can you try the solution offered in this post

The command is CI= npm run build - no additional or less space - it should be exactly that.