Home
Support Forums

Build Problems but works on local machine


netify site name: elegant-mcnulty-6805bd.netlify.app

Deploy log:

12:01:28 AM: Build ready to start
12:01:42 AM: build-image version: fa439ad1ab9393b2c0d449d8d7c033927683f4b0
12:01:42 AM: build-image tag: v4.3.0
12:01:42 AM: buildbot version: 0d69a20db0b5dda37e383402cf2a26e5b4f328ad
12:01:42 AM: Fetching cached dependencies
12:01:42 AM: Failed to fetch cache, continuing with build
12:01:42 AM: Starting to prepare the repo for build
12:01:42 AM: No cached dependencies found. Cloning fresh repo
12:01:42 AM: git clone https://github.com/Aigerim-ai/myweb
12:01:43 AM: Preparing Git Reference refs/heads/master
12:01:44 AM: Parsing package.json dependencies
12:01:44 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘dist’ versus ‘dist/’ in the Netlify UI
12:01:44 AM: Starting build script
12:01:44 AM: Installing dependencies
12:01:44 AM: Python version set to 2.7
12:01:45 AM: Downloading and installing node v16.7.0…
12:01:45 AM: Downloading https://nodejs.org/dist/v16.7.0/node-v16.7.0-linux-x64.tar.xz
12:01:45 AM: Computing checksum with sha256sum
12:01:46 AM: Checksums matched!
12:01:48 AM: Now using node v16.7.0 (npm v7.20.3)
12:01:48 AM: Started restoring cached build plugins
12:01:48 AM: Finished restoring cached build plugins
12:01:49 AM: Attempting ruby version 2.7.2, read from environment
12:01:50 AM: Using ruby version 2.7.2
12:01:50 AM: Using PHP version 8.0
12:01:50 AM: Started restoring cached node modules
12:01:50 AM: Finished restoring cached node modules
12:01:50 AM: Installing NPM modules using NPM version 7.20.3
12:01:52 AM: npm ERR! code ERESOLVE
12:01:52 AM: npm ERR! ERESOLVE unable to resolve dependency tree
12:01:52 AM: npm ERR!
12:01:52 AM: npm ERR! While resolving: simplefolio@1.0.1
12:01:52 AM: npm ERR! Found: webpack@5.51.1
12:01:52 AM: npm ERR! node_modules/webpack
12:01:52 AM: npm ERR! dev webpack@"^5.40.0" from the root project
12:01:52 AM: npm ERR!
12:01:52 AM: npm ERR! Could not resolve dependency:
12:01:52 AM: npm ERR! peer webpack@"^4.0.0" from optimize-css-assets-webpack-plugin@6.0.1
12:01:52 AM: npm ERR! node_modules/optimize-css-assets-webpack-plugin
12:01:52 AM: npm ERR! dev optimize-css-assets-webpack-plugin@"^6.0.1" from the root project
12:01:52 AM: npm ERR!
12:01:52 AM: npm ERR! Fix the upstream dependency conflict, or retry
12:01:52 AM: npm ERR! this command with --force, or --legacy-peer-deps
12:01:52 AM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
12:01:52 AM: npm ERR!
12:01:52 AM: npm ERR! See /opt/buildhome/.npm/eresolve-report.txt for a full report.
12:01:52 AM: npm ERR! A complete log of this run can be found in:
12:01:52 AM: npm ERR! /opt/buildhome/.npm/_logs/2021-08-22T18_01_52_675Z-debug.log
12:01:52 AM: Error during NPM install
12:01:52 AM: Build was terminated: Build script returned non-zero exit code: 1
12:01:52 AM: Creating deploy upload records
12:01:52 AM: Failing build: Failed to build site
12:01:52 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1
12:01:52 AM: Finished processing build request in 10.656741972s

This dependency needs Webpack 4, but you’re using Webpack 5:

So, either downgrade or specify the flags

as mentioned here: