Unable to deploy with Module not found: Error

failed to build with the following log. Seems to be something to do with node modules and bootstrap. Kindly help with it

6:22:04 AM: Waiting for other deploys from your team to complete. Check the queue: Netlify App
6:22:45 AM: Build ready to start
6:22:46 AM: build-image version: 2cee85eb7f808bf3b6e87378c5307f9411f0a332
6:22:46 AM: build-image tag: v3.8.0
6:22:46 AM: buildbot version: fb1691e123b163167156a643d7042e525001587f
6:22:46 AM: Fetching cached dependencies
6:22:47 AM: Failed to fetch cache, continuing with build
6:22:47 AM: Starting to prepare the repo for build
6:22:47 AM: No cached dependencies found. Cloning fresh repo
6:22:47 AM: git clone GitHub - AdedayoOpeyemi/weather-app: Javascript Application to get weather details of cities. The App uses Open weather API to collect weather report and information for various cities in the world
6:22:48 AM: Preparing Git Reference pull/1/head
6:22:48 AM: Parsing package.json dependencies
6:22:49 AM: Starting build script
6:22:49 AM: Installing dependencies
6:22:49 AM: Python version set to 2.7
6:22:50 AM: v12.18.0 is already installed.
6:22:50 AM: Now using node v12.18.0 (npm v6.14.4)
6:22:50 AM: Started restoring cached build plugins
6:22:50 AM: Finished restoring cached build plugins
6:22:50 AM: Attempting ruby version 2.7.2, read from environment
6:22:51 AM: Using ruby version 2.7.2
6:22:52 AM: Using PHP version 5.6
6:22:52 AM: Started restoring cached yarn cache
6:22:52 AM: Finished restoring cached yarn cache
6:22:52 AM: Installing yarn at version 1.22.10
6:22:52 AM: Installing Yarn!
6:22:52 AM: > Downloading tarball…
6:22:52 AM: [1/2]: https://yarnpkg.com/downloads/1.22.10/yarn-v1.22.10.tar.gz → /tmp/yarn.tar.gz.BtXuNtxkTy
6:22:52 AM: % Total % Received % Xferd Average Speed Time Time Time Current
6:22:52 AM: Dload Upload Total Spent Left Speed
6:22:52 AM: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
6:22:52 AM: 100 81 100 81 0 0 443 0 --:–:-- --:–:-- --:–:-- 445
6:22:52 AM: 100 95 100 95 0 0 184 0 --:–:-- --:–:-- --:–:-- 184
6:22:53 AM: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
6:22:53 AM: 100 626 100 626 0 0 822 0 --:–:-- --:–:-- --:–:-- 611k
6:22:53 AM: 100 1215k 100 1215k 0 0 1139k 0 0:00:01 0:00:01 --:–:-- 1139k
6:22:53 AM: [2/2]: https://yarnpkg.com/downloads/1.22.10/yarn-v1.22.10.tar.gz.asc → /tmp/yarn.tar.gz.BtXuNtxkTy.asc
6:22:53 AM: 100 85 100 85 0 0 1230 0 --:–:-- --:–:-- --:–:-- 1230
6:22:53 AM: 100 99 100 99 0 0 1009 0 --:–:-- --:–:-- --:–:-- 1009
6:22:53 AM: 100 630 100 630 0 0 4978 0 --:–:-- --:–:-- --:–:-- 4978
6:22:53 AM: 100 832 100 832 0 0 6020 0 --:–:-- --:–:-- --:–:-- 6020
6:22:53 AM: > Verifying integrity…
6:22:53 AM: gpg: Signature made Fri 02 Oct 2020 11:17:27 AM UTC using RSA key ID 69475BAA
6:22:53 AM: gpg: Good signature from “Yarn Packaging yarn@dan.cx
6:22:53 AM: gpg: WARNING: This key is not certified with a trusted signature!
6:22:53 AM: gpg: There is no indication that the signature belongs to the owner.
6:22:53 AM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310
6:22:53 AM: Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA
6:22:53 AM: > GPG signature looks good
6:22:53 AM: > Extracting to ~/.yarn…
6:22:53 AM: > Adding to $PATH…
6:22:53 AM: > Successfully installed Yarn 1.22.10! Please open another terminal where the yarn command will now be available.
6:22:54 AM: No yarn workspaces detected
6:22:54 AM: Started restoring cached node modules
6:22:54 AM: Finished restoring cached node modules
6:22:54 AM: Installing NPM modules using Yarn version 1.22.10
6:22:54 AM: yarn install v1.22.10
6:22:54 AM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
6:22:54 AM: [1/4] Resolving packages…
6:22:55 AM: warning webpack-dev-server > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
6:22:55 AM: [2/4] Fetching packages…
6:23:06 AM: info fsevents@1.2.13: The platform “linux” is incompatible with this module.
6:23:06 AM: info “fsevents@1.2.13” is an optional dependency and failed compatibility check. Excluding it from installation.
6:23:06 AM: [3/4] Linking dependencies…
6:23:06 AM: warning " > bootstrap@5.0.2" has unmet peer dependency “@popperjs/core@^2.9.2”.
6:23:12 AM: [4/4] Building fresh packages…
6:23:12 AM: success Saved lockfile.
6:23:12 AM: Done in 18.06s.
6:23:12 AM: NPM modules installed using Yarn
6:23:13 AM: Started restoring cached go cache
6:23:13 AM: Finished restoring cached go cache
6:23:13 AM: go version go1.14.4 linux/amd64
6:23:13 AM: go version go1.14.4 linux/amd64
6:23:13 AM: Installing missing commands
6:23:13 AM: Verify run directory
6:23:13 AM: ​
6:23:13 AM: ────────────────────────────────────────────────────────────────
6:23:13 AM: Netlify Build
6:23:13 AM: ────────────────────────────────────────────────────────────────
6:23:13 AM: ​
6:23:13 AM: ❯ Version
6:23:13 AM: @netlify/build 15.1.0
6:23:13 AM: ​
6:23:13 AM: ❯ Flags
6:23:13 AM: deployId: 60e539fc54f84600072d4e5a
6:23:13 AM: ​
6:23:13 AM: ❯ Current directory
6:23:13 AM: /opt/build/repo
6:23:13 AM: ​
6:23:13 AM: ❯ Config file
6:23:13 AM: No config file was defined: using default values.
6:23:13 AM: ​
6:23:13 AM: ❯ Context
6:23:13 AM: deploy-preview
6:23:13 AM: ​
6:23:13 AM: ────────────────────────────────────────────────────────────────
6:23:13 AM: 1. Build command from Netlify app
6:23:13 AM: ────────────────────────────────────────────────────────────────
6:23:13 AM: ​
6:23:13 AM: $ npm run build-prod
6:23:13 AM: > weather-app@1.0.0 build-prod /opt/build/repo
6:23:13 AM: > webpack --mode production
6:23:18 AM: assets by status 2.04 MiB [cached] 1 asset
6:23:18 AM: orphan modules 141 KiB [orphan] 5 modules
6:23:18 AM: runtime modules 663 bytes 3 modules
6:23:18 AM: cacheable modules 874 KiB
6:23:18 AM: modules by path ./node_modules/ 730 KiB
6:23:18 AM: modules by path ./node_modules/style-loader/dist/runtime/.js 4.12 KiB 4 modules modules by path ./node_modules/css-loader/dist/runtime/.js 3.79 KiB ./node_modules/css-loader/dist/runtime/cssWithMappingToString.js 2.22 KiB [built] [code generated] ./node_modules/css-loader/dist/runtime/api.js 1.57 KiB [built] [code generated] ./node_modules/css-loader/dist/cjs.js!./node_modules/bootstrap/dist/css/bootstrap.min.css 722 KiB [built] [code generated] modules by path ./src/ 145 KiB ./src/index.js + 5 modules 142 KiB [built] [code generated] ./node_modules/css-loader/dist/cjs.js!./src/assets/styles.css 2.64 KiB [built] [code generated]ERROR in ./node_modules/bootstrap/dist/js/bootstrap.esm.js 6:0-41Module not found: Error: Can’t resolve ‘@popperjs/core’ in '/opt/build/repo/node_modules/bootstrap/dist/js’resolve ‘@popperjs/core’ in ‘/opt/build/repo/node_modules/bootstrap/dist/js’ Parsed request is a module using description file: /opt/build/repo/node_modules/bootstrap/package.json (relative path: ./dist/js) Field ‘browser’ doesn’t contain a valid alias configuration resolve as module /opt/build/repo/node_modules/bootstrap/dist/js/node_modules doesn’t exist or is not a directory /opt/build/repo/node_modules/bootstrap/dist/node_modules doesn’t exist or is not a directory /opt/build/repo/node_modules/bootstrap/node_modules doesn’t exist or is not a directory /opt/build/repo/node_modules/node_modules doesn’t exist or is not a directory looking for modules in /opt/build/repo/node_modules single file module using description file: /opt/build/repo/package.json (relative path: ./node_modules/@popperjs/core) no extension Field ‘browser’ doesn’t contain a valid alias configuration /opt/build/repo/node_modules/@popperjs/core doesn’t exist .js Field ‘browser’ doesn’t contain a valid alias configuration /opt/build/repo/node_modules/@popperjs/core.js doesn’t exist .json Field ‘browser’ doesn’t contain a valid alias configuration /opt/build/repo/node_modules/@popperjs/core.json doesn’t exist .wasm Field ‘browser’ doesn’t contain a valid alias configuration /opt/build/repo/node_modules/@popperjs/core.wasm doesn’t exist /opt/build/repo/node_modules/@popperjs/core doesn’t exist /opt/build/node_modules doesn’t exist or is not a directory /opt/node_modules doesn’t exist or is not a directory /node_modules doesn’t exist or is not a directory @ ./src/index.js 1:0-19webpack 5.41.1 compiled with 1 error in 3622 msnpm ERR! code ELIFECYCLE
6:23:18 AM: npm ERR! errno 1
6:23:18 AM: npm ERR! weather-app@1.0.0 build-prod: webpack --mode production
6:23:18 AM: npm ERR! Exit status 1
6:23:18 AM: npm ERR!
6:23:18 AM: npm ERR! Failed at the weather-app@1.0.0 build-prod script.
6:23:18 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
6:23:18 AM: npm ERR! A complete log of this run can be found in:
6:23:18 AM: npm ERR! /opt/buildhome/.npm/_logs/2021-07-07T05_23_18_292Z-debug.log
6:23:18 AM: ​
6:23:18 AM: ────────────────────────────────────────────────────────────────
6:23:18 AM: “build.command” failed
6:23:18 AM: ────────────────────────────────────────────────────────────────
6:23:18 AM: ​
6:23:18 AM: Error message
6:23:18 AM: Command failed with exit code 1: npm run build-prod
6:23:18 AM: ​
6:23:18 AM: Error location
6:23:18 AM: In Build command from Netlify app:
6:23:18 AM: npm run build-prod
6:23:18 AM: ​
6:23:18 AM: Resolved config
6:23:18 AM: build:
6:23:18 AM: command: npm run build-prod
6:23:18 AM: commandOrigin: ui
6:23:18 AM: environment:
6:23:18 AM: - REVIEW_ID
6:23:18 AM: publish: /opt/build/repo/dist
6:23:18 AM: publishOrigin: ui
6:23:18 AM: functions:
6:23:18 AM: ‘*’: {}
6:23:18 AM: Caching artifacts
6:23:18 AM: Started saving node modules
6:23:18 AM: Finished saving node modules
6:23:18 AM: Started saving build plugins
6:23:21 AM: Creating deploy upload records
6:23:21 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
6:23:18 AM: Finished saving build plugins
6:23:18 AM: Started saving yarn cache
6:23:18 AM: Finished saving yarn cache
6:23:18 AM: Started saving pip cache
6:23:18 AM: Finished saving pip cache
6:23:18 AM: Started saving emacs cask dependencies
6:23:18 AM: Finished saving emacs cask dependencies
6:23:18 AM: Started saving maven dependencies
6:23:18 AM: Finished saving maven dependencies
6:23:18 AM: Started saving boot dependencies
6:23:18 AM: Finished saving boot dependencies
6:23:18 AM: Started saving rust rustup cache
6:23:18 AM: Finished saving rust rustup cache
6:23:18 AM: Started saving go dependencies
6:23:18 AM: Finished saving go dependencies
6:23:21 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:23:21 AM: Failing build: Failed to build site
6:23:21 AM: Finished processing build request in 34.394638836s

The repo link used in this deploy log seems to be empty. GitHub - AdedayoOpeyemi/weather-app: Javascript Application to get weather details of cities. The App uses Open weather API to collect weather report and information for various cities in the world

Hi Hrishikesh,

I am deploying the feature-branch of which I specified in my deployment settings.

I just tried cloning the repo and deployed it and it worked fine: inspiring-bose-84a6ab.netlify.app. Could you try clearing cache and deploying?

Thanks for the response.

Where will you suggest I clear cache from.

Plus can you provide the parameters you used for the deployment settings. Maybe that is where I am making a mistake

You could clear cache from here:

I didn’t do anything special in the settings, but here you go:

Repo: https://github.com/Hrishikesh-K/weather-app-feature-branch

Hi Hrishikesh,

Thanks for the response. I had my deployment set up just the way it is in your screenshots and also cleared cache, but it still returned the same error message

1:13:34 PM: Build ready to start 1:13:35 PM: build-image version: 2cee85eb7f808bf3b6e87378c5307f9411f0a332 1:13:35 PM: build-image tag: v3.8.0 1:13:35 PM: buildbot version: fb1691e123b163167156a643d7042e525001587f 1:13:36 PM: Building without cache 1:13:36 PM: Starting to prepare the repo for build 1:13:36 PM: No cached dependencies found. Cloning fresh repo 1:13:36 PM: git clone https://github.com/AdedayoOpeyemi/weather-app 1:13:37 PM: Preparing Git Reference refs/heads/feature-branch 1:13:37 PM: Parsing package.json dependencies 1:13:37 PM: Starting build script 1:13:37 PM: Installing dependencies 1:13:37 PM: Python version set to 2.7 1:13:39 PM: v12.18.0 is already installed. 1:13:39 PM: Now using node v12.18.0 (npm v6.14.4) 1:13:39 PM: Started restoring cached build plugins 1:13:39 PM: Finished restoring cached build plugins 1:13:39 PM: Attempting ruby version 2.7.2, read from environment 1:13:41 PM: Using ruby version 2.7.2 1:13:41 PM: Using PHP version 5.6 1:13:41 PM: Started restoring cached yarn cache 1:13:41 PM: Finished restoring cached yarn cache 1:13:41 PM: Installing yarn at version 1.22.10 1:13:41 PM: Installing Yarn! 1:13:41 PM: > Downloading tarball… 1:13:41 PM: [1/2]: https://yarnpkg.com/downloads/1.22.10/yarn-v1.22.10.tar.gz → /tmp/yarn.tar.gz.vQuGgFswfJ 1:13:41 PM: % Total % Received % Xferd Average Speed Time Time Time Current 1:13:41 PM: Dload Upload Total Spent Left Speed 1:13:41 PM: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0 1:13:41 PM: 100 81 100 81 0 0 430 0 --:–:-- --:–:-- --:–:-- 433 1:13:42 PM: 100 95 100 95 0 0 186 0 --:–:-- --:–:-- --:–:-- 186 1:13:42 PM: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0 1:13:42 PM: 100 626 100 626 0 0 830 0 --:–:-- --:–:-- --:–:-- 19562 1:13:42 PM: 100 1215k 100 1215k 0 0 1064k 0 0:00:01 0:00:01 --:–:-- 1064k 1:13:42 PM: [2/2]: https://yarnpkg.com/downloads/1.22.10/yarn-v1.22.10.tar.gz.asc → /tmp/yarn.tar.gz.vQuGgFswfJ.asc 1:13:42 PM: 100 85 100 85 0 0 1865 0 --:–:-- --:–:-- --:–:-- 1865 1:13:42 PM: 100 99 100 99 0 0 1346 0 --:–:-- --:–:-- --:–:-- 1346 1:13:42 PM: 100 630 100 630 0 0 6237 0 --:–:-- --:–:-- --:–:-- 6237 1:13:42 PM: 100 832 100 832 0 0 7063 0 --:–:-- --:–:-- --:–:-- 7063 1:13:42 PM: > Verifying integrity… 1:13:42 PM: gpg: Signature made Fri 02 Oct 2020 11:17:27 AM UTC using RSA key ID 69475BAA 1:13:42 PM: gpg: Good signature from “Yarn Packaging <yarn@dan.cx>” 1:13:42 PM: gpg: WARNING: This key is not certified with a trusted signature! 1:13:42 PM: gpg: There is no indication that the signature belongs to the owner. 1:13:42 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310 1:13:42 PM: Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA 1:13:42 PM: > GPG signature looks good 1:13:42 PM: > Extracting to ~/.yarn… 1:13:43 PM: > Adding to $PATH… 1:13:43 PM: > Successfully installed Yarn 1.22.10! Please open another terminal where the yarn command will now be available. 1:13:43 PM: No yarn workspaces detected 1:13:43 PM: Started restoring cached node modules 1:13:43 PM: Finished restoring cached node modules 1:13:44 PM: Installing NPM modules using Yarn version 1.22.10 1:13:44 PM: yarn install v1.22.10 1:13:44 PM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. 1:13:44 PM: [1/4] Resolving packages… 1:13:45 PM: warning webpack-dev-server > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. 1:13:45 PM: [2/4] Fetching packages… 1:13:58 PM: info fsevents@1.2.13: The platform “linux” is incompatible with this module. 1:13:58 PM: info “fsevents@1.2.13” is an optional dependency and failed compatibility check. Excluding it from installation. 1:13:58 PM: [3/4] Linking dependencies… 1:13:58 PM: warning " > bootstrap@5.0.2" has unmet peer dependency “@popperjs/core@^2.9.2”. 1:14:04 PM: [4/4] Building fresh packages… 1:14:05 PM: success Saved lockfile. 1:14:05 PM: Done in 21.04s. 1:14:05 PM: NPM modules installed using Yarn 1:14:05 PM: Started restoring cached go cache 1:14:05 PM: Finished restoring cached go cache 1:14:05 PM: go version go1.14.4 linux/amd64 1:14:05 PM: go version go1.14.4 linux/amd64 1:14:05 PM: Installing missing commands 1:14:05 PM: Verify run directory 1:14:06 PM: 1:14:06 PM: ──────────────────────────────────────────────────────────────── 1:14:06 PM: Netlify Build 1:14:06 PM: ──────────────────────────────────────────────────────────────── 1:14:06 PM: 1:14:06 PM: ❯ Version 1:14:06 PM: @netlify/build 15.1.0 1:14:06 PM: 1:14:06 PM: ❯ Flags 1:14:06 PM: deployId: 60e59a6e4703f0612877f51d 1:14:06 PM: 1:14:06 PM: ❯ Current directory 1:14:06 PM: /opt/build/repo 1:14:06 PM: 1:14:06 PM: ❯ Config file 1:14:06 PM: No config file was defined: using default values. 1:14:06 PM: 1:14:06 PM: ❯ Context 1:14:06 PM: production 1:14:06 PM: 1:14:06 PM: ──────────────────────────────────────────────────────────────── 1:14:06 PM: 1. Build command from Netlify app 1:14:06 PM: ──────────────────────────────────────────────────────────────── 1:14:06 PM: 1:14:06 PM: $ npm run build-prod 1:14:06 PM: > weather-app@1.0.0 build-prod /opt/build/repo 1:14:06 PM: > webpack --mode production 1:14:12 PM: assets by status 2.04 MiB [cached] 1 asset 1:14:12 PM: orphan modules 141 KiB [orphan] 5 modules 1:14:12 PM: runtime modules 663 bytes 3 modules 1:14:12 PM: cacheable modules 874 KiB 1:14:12 PM: modules by path ./node_modules/ 730 KiB 1:14:12 PM: modules by path ./node_modules/style-loader/dist/runtime/.js 4.12 KiB 4 modules modules by path ./node_modules/css-loader/dist/runtime/.js 3.79 KiB ./node_modules/css-loader/dist/runtime/cssWithMappingToString.js 2.22 KiB [built] [code generated] ./node_modules/css-loader/dist/runtime/api.js 1.57 KiB [built] [code generated] ./node_modules/css-loader/dist/cjs.js!./node_modules/bootstrap/dist/css/bootstrap.min.css 722 KiB [built] [code generated] modules by path ./src/ 145 KiB ./src/index.js + 5 modules 142 KiB [built] [code generated] ./node_modules/css-loader/dist/cjs.js!./src/assets/styles.css 2.64 KiB [built] [code generated]ERROR in ./node_modules/bootstrap/dist/js/bootstrap.esm.js 6:0-41Module not found: Error: Can’t resolve ‘@popperjs/core’ in '/opt/build/repo/node_modules/bootstrap/dist/js’resolve ‘@popperjs/core’ in ‘/opt/build/repo/node_modules/bootstrap/dist/js’ Parsed request is a module using description file: /opt/build/repo/node_modules/bootstrap/package.json (relative path: ./dist/js) Field ‘browser’ doesn’t contain a valid alias configuration resolve as module /opt/build/repo/node_modules/bootstrap/dist/js/node_modules doesn’t exist or is not a directory /opt/build/repo/node_modules/bootstrap/dist/node_modules doesn’t exist or is not a directory /opt/build/repo/node_modules/bootstrap/node_modules doesn’t exist or is not a directory /opt/build/repo/node_modules/node_modules doesn’t exist or is not a directory looking for modules in /opt/build/repo/node_modules single file module using description file: /opt/build/repo/package.json (relative path: ./node_modules/@popperjs/core) no extension Field ‘browser’ doesn’t contain a valid alias configuration /opt/build/repo/node_modules/@popperjs/core doesn’t exist .js Field ‘browser’ doesn’t contain a valid alias configuration /opt/build/repo/node_modules/@popperjs/core.js doesn’t exist .json Field ‘browser’ doesn’t contain a valid alias configuration /opt/build/repo/node_modules/@popperjs/core.json doesn’t exist .wasm Field ‘browser’ doesn’t contain a valid alias configuration /opt/build/repo/node_modules/@popperjs/core.wasm doesn’t exist /opt/build/repo/node_modules/@popperjs/core doesn’t exist /opt/build/node_modules doesn’t exist or is not a directory /opt/node_modules doesn’t exist or is not a directory /node_modules doesn’t exist or is not a directory @ ./src/index.js 1:0-19webpack 5.41.1 compiled with 1 error in 4503 msnpm ERR! code ELIFECYCLE 1:14:12 PM: npm ERR! errno 1 1:14:12 PM: npm ERR! weather-app@1.0.0 build-prod: webpack --mode production 1:14:15 PM: Creating deploy upload records 1:14:12 PM: npm ERR! Exit status 1 1:14:12 PM: npm ERR! 1:14:12 PM: npm ERR! Failed at the weather-app@1.0.0 build-prod script. 1:14:17 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 1:14:12 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 1:14:12 PM: npm ERR! A complete log of this run can be found in: 1:14:12 PM: npm ERR! /opt/buildhome/.npm/_logs/2021-07-07T12_14_12_141Z-debug.log 1:14:12 PM: 1:14:12 PM: ──────────────────────────────────────────────────────────────── 1:14:12 PM: “build.command” failed 1:14:12 PM: ──────────────────────────────────────────────────────────────── 1:14:12 PM: 1:14:12 PM: Error message 1:14:12 PM: Command failed with exit code 1: npm run build-prod 1:14:12 PM: 1:14:12 PM: Error location 1:14:12 PM: In Build command from Netlify app: 1:14:12 PM: npm run build-prod 1:14:12 PM: 1:14:12 PM: Resolved config 1:14:12 PM: build: 1:14:12 PM: command: npm run build-prod 1:14:12 PM: commandOrigin: ui 1:14:12 PM: publish: /opt/build/repo 1:14:12 PM: publishOrigin: default 1:14:12 PM: functions: 1:14:12 PM: ‘*’: {} 1:14:12 PM: Caching artifacts 1:14:12 PM: Started saving node modules 1:14:12 PM: Finished saving node modules 1:14:12 PM: Started saving build plugins 1:14:12 PM: Finished saving build plugins 1:14:12 PM: Started saving yarn cache 1:14:12 PM: Finished saving yarn cache 1:14:12 PM: Started saving pip cache 1:14:12 PM: Finished saving pip cache 1:14:12 PM: Started saving emacs cask dependencies 1:14:12 PM: Finished saving emacs cask dependencies 1:14:12 PM: Started saving maven dependencies 1:14:12 PM: Finished saving maven dependencies 1:14:12 PM: Started saving boot dependencies 1:14:12 PM: Finished saving boot dependencies 1:14:12 PM: Started saving rust rustup cache 1:14:12 PM: Finished saving rust rustup cache 1:14:12 PM: Started saving go dependencies 1:14:12 PM: Finished saving go dependencies 1:14:15 PM: Build failed due to a user error: Build script returned non-zero exit code: 2 1:14:17 PM: Failing build: Failed to build site 1:14:17 PM: Finished processing build request in 41.697721726s

That’s strange. The only other difference in our setups in I used the latest Node by setting an environment variable NODE_VERSION to node. Does that make a difference in your case?

Hi Hrishikesh,

Thanks for the help.

I figured out the issue was with a dependency that was missing. It has Bootstrap 5 which depends on @popper.js/Core instead of @popper.js. So, I added it to the project and included it in my list of dependencies and it works all well and good now.

Thanks