Hello,
i am trying to host my react app,
first i start with a npm run start as “Build command”
and build as Publish directory,
my error message for this step:
9:16:10 AM: Error during NPM install
9:16:10 AM: Build was terminated: Build script returned non-zero exit code: 1
then after made some researchs i tried :
CI= npm run build as “Build command”
my error message for this step:
9:27:17 AM: Error during NPM install
9:27:17 AM: Build was terminated: Build script returned non-zero exit code: 1
9:27:17 AM: Failing build: Failed to build site
and finally try to this command:
CI=" npm run build
i post here the entire deploy log:
9:30:50 AM: Build ready to start
9:30:53 AM: build-image version: d2c6dbeac570350a387d832f64bc980dc964ad65 (focal)
9:30:53 AM: build-image tag: v4.8.0
9:30:53 AM: buildbot version: 98f4353bfe2f007fef20c73a9adc5819e6bdb0ab
9:30:53 AM: Fetching cached dependencies
9:30:53 AM: Failed to fetch cache, continuing with build
9:30:53 AM: Starting to prepare the repo for build
9:30:53 AM: No cached dependencies found. Cloning fresh repo
9:30:53 AM: git clone GitHub - Matthieudegny/Github-repos
9:30:54 AM: Preparing Git Reference refs/heads/main
9:30:54 AM: Parsing package.json dependencies
9:30:55 AM: Starting build script
9:30:55 AM: Installing dependencies
9:30:55 AM: Python version set to 2.7
9:30:56 AM: Downloading and installing node v16.15.1…
9:30:56 AM: Downloading https://nodejs.org/dist/v16.15.1/node-v16.15.1-linux-x64.tar.xz…
9:30:57 AM: Computing checksum with sha256sum
9:30:57 AM: Checksums matched!
9:30:59 AM: Now using node v16.15.1 (npm v8.11.0)
9:31:00 AM: Started restoring cached build plugins
9:31:00 AM: Finished restoring cached build plugins
9:31:00 AM: Attempting ruby version 2.7.2, read from environment
9:31:01 AM: Using ruby version 2.7.2
9:31:01 AM: Using PHP version 8.0
9:31:01 AM: No npm workspaces detected
9:31:01 AM: Started restoring cached node modules
9:31:01 AM: Finished restoring cached node modules
9:31:02 AM: Installing NPM modules using NPM version 8.11.0
9:31:02 AM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
9:31:02 AM: npm WARN config location in the cache, and they are managed by
9:31:02 AM: npm WARN config cacache
.
9:31:02 AM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
9:31:02 AM: npm WARN config location in the cache, and they are managed by
9:31:02 AM: npm WARN config cacache
.
9:31:04 AM: npm ERR! code ERESOLVE
9:31:04 AM: npm ERR! ERESOLVE could not resolve
9:31:04 AM: npm ERR!
9:31:04 AM: npm ERR! While resolving: react-feather@2.0.9
9:31:04 AM: Creating deploy upload records
9:31:04 AM: npm ERR! Found: react@18.1.0
9:31:04 AM: npm ERR! node_modules/react
9:31:04 AM: npm ERR! react@"^18.1.0" from the root project
9:31:04 AM: npm ERR! peer react@">=16.8.0" from @emotion/react@11.9.0
9:31:04 AM: npm ERR! node_modules/@emotion/react
9:31:04 AM: npm ERR! @emotion/react@"^11.9.0" from the root project
9:31:04 AM: npm ERR! peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.8.1
9:31:04 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1 (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
9:31:04 AM: npm ERR! node_modules/@emotion/styled
9:31:04 AM: npm ERR! @emotion/styled@"^11.8.1" from the root project
9:31:04 AM: npm ERR! 3 more (@mui/material, @mui/styled-engine, @mui/system)
9:31:04 AM: npm ERR! 3 more (@mui/material, @mui/styled-engine, @mui/system)
9:31:04 AM: npm ERR! 13 more (@emotion/styled, @mui/base, @mui/material, …)
9:31:04 AM: npm ERR!
9:31:04 AM: npm ERR! Could not resolve dependency:
9:31:04 AM: npm ERR! peer react@"^16.8.6 || ^17" from react-feather@2.0.9
9:31:04 AM: npm ERR! node_modules/react-feather
9:31:04 AM: npm ERR! react-feather@"^2.0.9" from the root project
9:31:04 AM: npm ERR!
9:31:04 AM: npm ERR! Conflicting peer dependency: react@17.0.2
9:31:04 AM: npm ERR! node_modules/react
9:31:04 AM: npm ERR! peer react@"^16.8.6 || ^17" from react-feather@2.0.9
9:31:04 AM: npm ERR! node_modules/react-feather
9:31:04 AM: npm ERR! react-feather@"^2.0.9" from the root project
9:31:04 AM: npm ERR!
9:31:04 AM: npm ERR! Fix the upstream dependency conflict, or retry
9:31:04 AM: npm ERR! this command with --force, or --legacy-peer-deps
9:31:04 AM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
9:31:04 AM: npm ERR!
9:31:04 AM: npm ERR! See /opt/buildhome/.npm/eresolve-report.txt for a full report.
9:31:04 AM: npm ERR! A complete log of this run can be found in:
9:31:04 AM: npm ERR! /opt/buildhome/.npm/_logs/2022-06-08T07_31_02_816Z-debug-0.log
9:31:04 AM: Error during NPM install
9:31:04 AM: Build was terminated: Build script returned non-zero exit code: 1
9:31:04 AM: Failing build: Failed to build site
9:31:04 AM: Finished processing build request in 11.341676461s
the netify site name is: preeminent-rugelach-1e3512
i know these issue has already been solved, but after some researchs and differents trials, i am still locked,
i you need anyting else informations,