Deploy failed NPM

On my machine it works. I do not know what is happening. Just don’t build

3:29:45 PM: Build ready to start
3:30:08 PM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
3:30:08 PM: build-image tag: v4.10.1
3:30:08 PM: buildbot version: fe6512288e75c8fa5aadaebb51ed1f96e9314fd4
3:30:08 PM: Fetching cached dependencies
3:30:08 PM: Failed to fetch cache, continuing with build
3:30:08 PM: Starting to prepare the repo for build
3:30:08 PM: No cached dependencies found. Cloning fresh repo
3:30:08 PM: git clone https://github.com/chags/texnet
3:30:09 PM: Preparing Git Reference refs/heads/main
3:30:10 PM: Parsing package.json dependencies
3:30:11 PM: Starting build script
3:30:11 PM: Installing dependencies
3:30:11 PM: Python version set to 2.7
3:30:12 PM: v16.16.0 is already installed.
3:30:12 PM: Now using node v16.16.0 (npm v8.11.0)
3:30:12 PM: Started restoring cached build plugins
3:30:12 PM: Finished restoring cached build plugins
3:30:12 PM: Attempting ruby version 2.7.2, read from environment
3:30:13 PM: Using ruby version 2.7.2
3:30:13 PM: Using PHP version 8.0
3:30:13 PM: No npm workspaces detected
3:30:13 PM: Started restoring cached node modules
3:30:13 PM: Finished restoring cached node modules
3:30:14 PM: Installing NPM modules using NPM version 8.11.0
3:30:14 PM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
3:30:14 PM: npm WARN config location in the cache, and they are managed by
3:30:14 PM: npm WARN config     [`cacache`](http://npm.im/cacache).
3:30:14 PM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
3:30:14 PM: npm WARN config location in the cache, and they are managed by
3:30:14 PM: npm WARN config     [`cacache`](http://npm.im/cacache).
3:30:15 PM: npm ERR! code ERESOLVE
3:30:15 PM: npm ERR! ERESOLVE could not resolve
3:30:15 PM: npm ERR!
3:30:15 PM: npm ERR! While resolving: react-customizable-progressbar@1.0.3
3:30:15 PM: Creating deploy upload records
3:30:15 PM: npm ERR! Found: react@18.2.0
3:30:15 PM: npm ERR! node_modules/react
3:30:15 PM: npm ERR!   react@"^18.2.0" from the root project
3:30:15 PM: npm ERR!   peer react@">=16.3" from @fortawesome/react-fontawesome@0.2.0
3:30:15 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1 (https://ntl.fyi/exit-code-1)
3:30:15 PM: npm ERR!   node_modules/@fortawesome/react-fontawesome
3:30:15 PM: npm ERR!     @fortawesome/react-fontawesome@"^0.2.0" from the root project
3:30:15 PM: npm ERR!   22 more (@react-aria/ssr, @restart/hooks, @restart/ui, ...)
3:30:15 PM: npm ERR!
3:30:15 PM: npm ERR! Could not resolve dependency:
3:30:15 PM: npm ERR! peer react@"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-customizable-progressbar@1.0.3
3:30:15 PM: npm ERR! node_modules/react-customizable-progressbar
3:30:15 PM: npm ERR!   react-customizable-progressbar@"^1.0.3" from the root project
3:30:15 PM: npm ERR!
3:30:15 PM: npm ERR! Conflicting peer dependency: react@17.0.2
3:30:15 PM: npm ERR! node_modules/react
3:30:15 PM: npm ERR!   peer react@"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-customizable-progressbar@1.0.3
3:30:15 PM: npm ERR!   node_modules/react-customizable-progressbar
3:30:15 PM: npm ERR!     react-customizable-progressbar@"^1.0.3" from the root project
3:30:15 PM: npm ERR!
3:30:15 PM: npm ERR! Fix the upstream dependency conflict, or retry
3:30:15 PM: npm ERR! this command with --force, or --legacy-peer-deps
3:30:15 PM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
3:30:15 PM: npm ERR!
3:30:15 PM: npm ERR! See /opt/buildhome/.npm/eresolve-report.txt for a full report.
3:30:15 PM: npm ERR! A complete log of this run can be found in:
3:30:15 PM: npm ERR!     /opt/buildhome/.npm/_logs/2022-08-09T18_30_14_590Z-debug-0.log
3:30:15 PM: Error during NPM install
3:30:15 PM: Build was terminated: Build script returned non-zero exit code: 1
3:30:15 PM: Failing build: Failed to build site
3:30:15 PM: Finished processing build request in 7.705531885s

Hi @chags

This is probably happening due to a mismatch in node or npm versions. Can you try adding the recommended --legacy-peer-deps flag using a build environment variable:

NODE_ENV= --legacy-peer-deps

Hope this helps!

1 Like

I do not know how to do this? I created the variable but it still gives error

@chags You may have already entered the value correctly, but see this: