Trying to deploy my website

8:23:09 PM: $ npm run build
8:23:09 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
8:23:09 PM: npm WARN config location in the cache, and they are managed by
8:23:09 PM: npm WARN config cacache.
8:23:09 PM: > react-portfolio@0.1.0 build
8:23:09 PM: > react-scripts build
8:23:10 PM: (node:1548) [DEP0148] DeprecationWarning: Use of deprecated folder mapping “./” in the “exports” field module resolution of the package at /opt/build/repo/node_modules/postcss-safe-parser/node_modules/postcss/package.json.
8:23:10 PM: Update this package.json to use a subpath pattern like “./*”.
8:23:10 PM: (Use node --trace-deprecation ... to show where the warning was created)
8:23:10 PM: Creating an optimized production build…
8:23:21 PM: Failed to compile.
8:23:21 PM:
8:23:21 PM: ./node_modules/swiper/swiper-bundle.min.css
8:23:21 PM: Error: Cannot find module ‘caniuse-lite/data/features/css-unicode-bidi’
8:23:21 PM: Require stack:
8:23:21 PM: - /opt/build/repo/node_modules/autoprefixer/data/prefixes.js
8:23:21 PM: - /opt/build/repo/node_modules/autoprefixer/lib/autoprefixer.js
8:23:21 PM: - /opt/build/repo/node_modules/postcss-preset-env/index.js
8:23:21 PM: - /opt/build/repo/node_modules/react-scripts/config/webpack.config.js
8:23:21 PM: - /opt/build/repo/node_modules/react-scripts/scripts/build.js
8:23:21 PM: ​
8:23:21 PM: ────────────────────────────────────────────────────────────────
8:23:21 PM: “build.command” failed
8:23:21 PM: ────────────────────────────────────────────────────────────────
8:23:21 PM: ​
8:23:21 PM: Error message
8:23:21 PM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
8:23:21 PM: ​
8:23:21 PM: Error location
8:23:21 PM: In Build command from Netlify app:
8:23:21 PM: npm run build

github.com/MOONDOG97/react-project-mp

12:27:56 AM: Build ready to start
12:27:58 AM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
12:27:58 AM: build-image tag: v4.10.1
12:27:58 AM: buildbot version: 37262c48b1f3cfa88c6caed707d29b19aef6a5a7
12:27:58 AM: Fetching cached dependencies
12:27:58 AM: Starting to download cache of 778.0MB
12:28:04 AM: Finished downloading cache in 5.706657548s
12:28:04 AM: Starting to extract cache
12:28:06 AM: Finished extracting cache in 2.542849504s
12:28:06 AM: Finished fetching cache in 8.341981136s
12:28:06 AM: Starting to prepare the repo for build
12:28:06 AM: Preparing Git Reference refs/heads/main
12:28:07 AM: Parsing package.json dependencies
12:28:08 AM: Starting build script
12:28:08 AM: Installing dependencies
12:28:08 AM: Python version set to 2.7
12:28:08 AM: Started restoring cached node version
12:28:09 AM: Finished restoring cached node version
12:28:09 AM: v16.17.0 is already installed.
12:28:09 AM: Now using node v16.17.0 (npm v8.15.0)
12:28:09 AM: Started restoring cached build plugins
12:28:09 AM: Finished restoring cached build plugins
12:28:10 AM: Attempting ruby version 2.7.2, read from environment
12:28:10 AM: Using ruby version 2.7.2
12:28:10 AM: Using PHP version 8.0
12:28:11 AM: No npm workspaces detected
12:28:11 AM: Started restoring cached node modules
12:28:11 AM: Finished restoring cached node modules
12:28:11 AM: Installing NPM modules using NPM version 8.15.0
12:28:11 AM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
12:28:11 AM: npm WARN config location in the cache, and they are managed by
12:28:11 AM: npm WARN config cacache.
12:28:11 AM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
12:28:11 AM: npm WARN config location in the cache, and they are managed by
12:28:11 AM: npm WARN config cacache.
12:28:14 AM: npm ERR! code ERESOLVE
12:28:14 AM: npm ERR! ERESOLVE unable to resolve dependency tree
12:28:14 AM: npm ERR!
12:28:14 AM: npm ERR! While resolving: react-portfolio@0.1.0
12:28:14 AM: Creating deploy upload records
12:28:14 AM: npm ERR! Found: react@17.0.2
12:28:14 AM: npm ERR! node_modules/react
12:28:14 AM: npm ERR! react@“^17.0.2” from the root project
12:28:14 AM: npm ERR!
12:28:14 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)
12:28:14 AM: npm ERR! Could not resolve dependency:
12:28:14 AM: npm ERR! peer react@“^0.14.0 || ^15.0.0 || ^16.0.0” from react-smooth-scrollbar@8.0.6
12:28:14 AM: npm ERR! node_modules/react-smooth-scrollbar
12:28:14 AM: npm ERR! react-smooth-scrollbar@“^8.0.6” from the root project
12:28:14 AM: npm ERR!
12:28:14 AM: npm ERR! Fix the upstream dependency conflict, or retry
12:28:14 AM: npm ERR! this command with --force, or --legacy-peer-deps
12:28:14 AM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
12:28:14 AM: npm ERR!
12:28:14 AM: npm ERR! See /opt/buildhome/.npm/eresolve-report.txt for a full report.
12:28:14 AM: npm ERR! A complete log of this run can be found in:
12:28:14 AM: npm ERR! /opt/buildhome/.npm/_logs/2022-09-12T07_28_11_892Z-debug-0.log
12:28:14 AM: Error during NPM install
12:28:14 AM: Build was terminated: Build script returned non-zero exit code: 1
12:28:14 AM: Failing build: Failed to build site
12:28:14 AM: Finished processing build request in 16.211465309s

https://github.com/MOONDOG97/react-project-mp

Have a read through this post @Moondogfrom_Bahamas as it describes the solution to your issue

hey I tried to use the two commands however the site is still giving me back the same error. any suggestions

Im trying to find the webpack in my packagejson , however it doesnt appear in that.

Have you used the NPM_FLAGS environment variable as I demonstrated here?

The author hasn’t updated this package in 5 years. It requires at most react 16 and you are using react 17. I would suggest finding a different package that has the same functionality that is still maintained.

1 Like

Hey,
Yea im working on trying out what you did, i’ll take note of that and look into it as well. so your saying i should change the package ultimately because it will stop working ?

Yes. As noted in the GitHub Repository, it is Not Actively Maintained and is now archived.

2 Likes