Failed to Deploy with exit code 1

Hello,

I’ve recently tried to do my first react deploy on netlify, and it failed to deploy with exit code none zero.

I see other people have had a similar issue, but the solution suggested seems to be order the system to ignore the problem? By using npm --force (as suggested in the deployment log).

I do not understand how to:

  1. Fix the Upstream Dependency
  2. If I used the --force workaround, do I enter that in my vscode terminal or on netlify’s CLI?

Thank you

1:44:26 AM: build-image version: d7b3813f01c06610bc1723ff1b22446513ee7941 (focal)
1:44:26 AM: build-image tag: v4.14.3
1:44:26 AM: buildbot version: f2613f2234a773b4fab58b5a3c03c743fe78f9bf
1:44:27 AM: Building without cache
1:44:27 AM: Starting to prepare the repo for build
1:44:27 AM: No cached dependencies found. Cloning fresh repo
1:44:27 AM: git clone https://github.com/nathantbohn/dot_helper_application
1:44:27 AM: Preparing Git Reference refs/heads/master
1:44:27 AM: Parsing package.json dependencies
1:44:29 AM: Starting build script
1:44:29 AM: Installing dependencies
1:44:29 AM: Python version set to 2.7
1:44:29 AM: v16.18.0 is already installed.
1:44:29 AM: Now using node v16.18.0 (npm v8.19.2)
1:44:29 AM: Enabling node corepack
1:44:29 AM: Started restoring cached build plugins
1:44:29 AM: Finished restoring cached build plugins
1:44:29 AM: Attempting ruby version 2.7.2, read from environment
1:44:30 AM: Using ruby version 2.7.2
1:44:30 AM: Using PHP version 8.0
1:44:31 AM: No npm workspaces detected
1:44:31 AM: Started restoring cached node modules
1:44:31 AM: Finished restoring cached node modules
1:44:31 AM: Installing NPM modules using NPM version 8.19.2
1:44:33 AM: npm WARN ERESOLVE overriding peer dependency
1:44:33 AM: npm WARN While resolving: fm-react-upwork-done@1.0.0
1:44:33 AM: npm WARN Found: react@18.2.0
1:44:33 AM: npm WARN node_modules/react
1:44:33 AM: npm WARN   react@"18.0.0" from the root project
1:44:33 AM: npm WARN   15 more (@mui/private-theming, @mui/styled-engine, @mui/system, ...)
1:44:33 AM: npm WARN
1:44:33 AM: npm WARN Could not resolve dependency:
1:44:33 AM: npm WARN peer react@"^18.2.0" from react-dom@18.2.0
1:44:33 AM: npm WARN node_modules/react-dom
1:44:33 AM: npm WARN   react-dom@"18.0.0" from the root project
1:44:33 AM: npm WARN   5 more (@testing-library/react, react-router-dom, ...)
1:44:33 AM: npm WARN ERESOLVE overriding peer dependency
1:44:33 AM: npm WARN While resolving: fm-react-upwork-done@1.0.0
1:44:33 AM: npm WARN Found: react@18.2.0
1:44:33 AM: npm WARN node_modules/react
1:44:33 AM: npm WARN   react@"18.0.0" from the root project
1:44:33 AM: npm WARN   15 more (@mui/private-theming, @mui/styled-engine, @mui/system, ...)
1:44:33 AM: npm WARN
1:44:33 AM: npm WARN Could not resolve dependency:
1:44:33 AM: npm WARN peer react@"^18.2.0" from react-dom@18.2.0
1:44:33 AM: npm WARN node_modules/react-dom
1:44:33 AM: npm WARN   react-dom@"18.0.0" from the root project
1:44:33 AM: npm WARN   5 more (@testing-library/react, react-router-dom, ...)
1:44:34 AM: npm ERR! code ERESOLVE
1:44:34 AM: npm ERR! ERESOLVE could not resolve
1:44:34 AM: npm ERR!
1:44:34 AM: npm ERR! While resolving: react-scripts@4.0.0
1:44:34 AM: Creating deploy upload records
1:44:34 AM: npm ERR! Found: typescript@4.1.3
1:44:34 AM: npm ERR! node_modules/typescript
1:44:34 AM: npm ERR!   dev typescript@"4.1.3" from the root project
1:44:34 AM: npm ERR!
1:44:34 AM: Failed during stage 'building site': Build script returned non-zero exit code: 1 (https://ntl.fyi/exit-code-1)
1:44:34 AM: npm ERR! Could not resolve dependency:
1:44:34 AM: npm ERR! peerOptional typescript@"^3.2.1" from react-scripts@4.0.0
1:44:34 AM: npm ERR! node_modules/react-scripts
1:44:34 AM: npm ERR!   react-scripts@"4.0.0" from the root project
1:44:34 AM: npm ERR!
1:44:34 AM: npm ERR! Conflicting peer dependency: typescript@3.9.10
1:44:34 AM: npm ERR! node_modules/typescript
1:44:34 AM: npm ERR!   peerOptional typescript@"^3.2.1" from react-scripts@4.0.0
1:44:34 AM: npm ERR!   node_modules/react-scripts
1:44:34 AM: npm ERR!     react-scripts@"4.0.0" from the root project
1:44:34 AM: npm ERR!
1:44:34 AM: npm ERR! Fix the upstream dependency conflict, or retry
1:44:34 AM: npm ERR! this command with --force, or --legacy-peer-deps
1:44:34 AM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
1:44:34 AM: npm ERR!
1:44:34 AM: npm ERR! See /opt/buildhome/.npm/eresolve-report.txt for a full report.
1:44:34 AM: npm ERR! A complete log of this run can be found in:
1:44:34 AM: npm ERR!     /opt/buildhome/.npm/_logs/2022-11-01T05_44_31_520Z-debug-0.log
1:44:34 AM: Error during NPM install
1:44:34 AM: Build was terminated: Build script returned non-zero exit code: 1
1:44:34 AM: Failing build: Failed to build site
1:44:34 AM: Finished processing build request in 7.573403731s

Hi @reaction,

Thanks for reaching out and welcome to Netlify’s Support Forums!

Checking your latest deploy, I see that you have successfully deployed the site. Could you let us know if you’re having any issues or how you resolved the issue?