Thank you so much for your response. Means a lot. I ran the commands ( npm install --force and npm install --legacy-peer-deps ) but it still prompted me to install peer dependencies manually in both cases so I installed webpack@“^4.0.0” using this command npm install --save-dev webpack@“^4.0.0” then pushed changes to my repo.
Then I tried to deploy using Git but got “deploy failed” error with this log:
3:07:20 PM: Build ready to start
3:07:22 PM: build-image version: c5b01a919d3e16af69445c5de0cacb49efbb1a23 (focal)
3:07:22 PM: build-image tag: v4.4.0
3:07:22 PM: buildbot version: 9deea8f876b3228119111d3a654f519dd1866bfe
3:07:22 PM: Fetching cached dependencies
3:07:22 PM: Failed to fetch cache, continuing with build
3:07:22 PM: Starting to prepare the repo for build
3:07:23 PM: No cached dependencies found. Cloning fresh repo
3:07:23 PM: git clone GitHub - jeddy019/new-website: My portfolio website!
3:07:24 PM: Preparing Git Reference refs/heads/main
3:07:24 PM: Parsing package.json dependencies
3:07:25 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘dist’ versus ‘dist/’ in the Netlify UI
3:07:25 PM: Starting build script
3:07:25 PM: Installing dependencies
3:07:25 PM: Python version set to 2.7
3:07:27 PM: Downloading and installing node v16.13.0…
3:07:27 PM: Downloading https://nodejs.org/dist/v16.13.0/node-v16.13.0-linux-x64.tar.xz…
3:07:27 PM: Computing checksum with sha256sum
3:07:27 PM: Checksums matched!
3:07:32 PM: Now using node v16.13.0 (npm v8.1.0)
3:07:32 PM: Started restoring cached build plugins
3:07:32 PM: Finished restoring cached build plugins
3:07:32 PM: Attempting ruby version 2.7.2, read from environment
3:07:34 PM: Using ruby version 2.7.2
3:07:34 PM: Using PHP version 8.0
3:07:34 PM: Started restoring cached node modules
3:07:34 PM: Finished restoring cached node modules
3:07:35 PM: Installing NPM modules using NPM version 8.1.0
3:07:36 PM: npm ERR! code ERESOLVE
3:07:36 PM: npm ERR! ERESOLVE unable to resolve dependency tree
3:07:36 PM: npm ERR!
3:07:36 PM: npm ERR! While resolving: portfolio@1.0.1
3:07:36 PM: npm ERR! Found: webpack@4.46.0
3:07:36 PM: npm ERR! node_modules/webpack
3:07:36 PM: npm ERR! dev webpack@“^4.0.0” from the root project
3:07:36 PM: npm ERR!
3:07:36 PM: npm ERR! Could not resolve dependency:
3:07:36 PM: npm ERR! peer webpack@“^5.0.0” from html-loader@2.1.2
3:07:36 PM: npm ERR! node_modules/html-loader
3:07:36 PM: npm ERR! dev html-loader@“^2.1.2” from the root project
3:07:36 PM: npm ERR!
3:07:36 PM: npm ERR! Fix the upstream dependency conflict, or retry
3:07:36 PM: npm ERR! this command with --force, or --legacy-peer-deps
3:07:36 PM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
3:07:36 PM: npm ERR!
3:07:36 PM: npm ERR! See /opt/buildhome/.npm/eresolve-report.txt for a full report.
3:07:36 PM: npm ERR! A complete log of this run can be found in:
3:07:36 PM: npm ERR! /opt/buildhome/.npm/_logs/2021-10-31T23_07_36_591Z-debug.log
3:07:36 PM: Creating deploy upload records
3:07:36 PM: Error during NPM install
3:07:36 PM: Build was terminated: Build script returned non-zero exit code: 1
3:07:36 PM: Failing build: Failed to build site
3:07:36 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1
3:07:36 PM: Finished processing build request in 14.16375069s
I don’t know what to do with this error log. What is happening? and what must I do?
I also deleted node_modules folder from my project and ran npm install to download it again as advised from some users on stack overflow
Another issue now is that the project is not even starting locally on my computer as it was before whenever I ran npm start.
The errors have changed so it means I’m getting closer to the solution!
Thank you so much in advance.