"build.command" failed . i have tried CI= npm run build

I need advice to debug deploy https://app.netlify.com/sites/practical-mcnulty-83e18a/deploys/5f25c2a2705776bfa4794119

you’ll need a space after the =, and not one before

CI= npm run build

(assuming your correct build command BEFORE these changes was npm run build, otherwise you’ll want to keep that bit and not use npm run build)

Hey i tried it but still getting the error message.

i used CI= npm run build

3:45:19 PM: ❯ Context
3:45:19 PM: production
3:45:19 PM: ​
3:45:19 PM: ┌───────────────────────────────────┐
3:45:19 PM: │ 1. Build command from Netlify app │
3:45:19 PM: └───────────────────────────────────┘
3:45:19 PM: ​
3:45:19 PM: $ CI= npm run build
3:45:20 PM: > little-rock@0.1.0 build /opt/build/repo
3:45:20 PM: > react-scripts build
3:45:21 PM: Creating an optimized production build…
3:45:25 PM: Failed to compile.
3:45:25 PM:
3:45:25 PM: ./src/App.js
3:45:25 PM: Cannot find module: ‘react-router-dom’. Make sure this package is installed.
3:45:25 PM: You can install this package by running: npm install react-router-dom.
3:45:25 PM: npm ERR! code ELIFECYCLE
3:45:25 PM: npm ERR! errno 1
3:45:25 PM: npm ERR! little-rock@0.1.0 build: react-scripts build
3:45:25 PM: npm ERR! Exit status 1
3:45:25 PM: npm ERR!
3:45:25 PM: npm ERR! Failed at the little-rock@0.1.0 build script.
3:45:25 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
3:45:25 PM: npm ERR! A complete log of this run can be found in:
3:45:25 PM: npm ERR! /opt/buildhome/.npm/_logs/2020-08-02T03_45_25_159Z-debug.log
3:45:25 PM:
3:45:25 PM: If the build failed with a warning about “process.env.CI = true”, this is due to “create-react-app” treating warnings as errors when in CI. In order to fix this problem, please either:
3:45:25 PM: - Fix the issues highlighted by the warnings above.
3:45:25 PM: - Or modify the “scripts.build” command in your “package.json” from “react-scripts build” to “CI= react-scripts build”
3:45:25 PM: More information can be found at https://docs.netlify.com/configure-builds/troubleshooting-tips/#build-fails-on-warning-message
3:45:25 PM: ​
3:45:25 PM: ┌─────────────────────────────┐
3:45:25 PM: │ “build.command” failed │
3:45:25 PM: └─────────────────────────────┘
3:45:25 PM: ​
3:45:25 PM: Error message
3:45:25 PM: Command failed with exit code 1: CI= npm run build
3:45:25 PM: ​
3:45:25 PM: Error location
3:45:25 PM: In Build command from Netlify app:
3:45:25 PM: CI= npm run build
3:45:25 PM: ​
3:45:25 PM: Resolved config
3:45:25 PM: build:
3:45:25 PM: command: CI= npm run build
3:45:25 PM: commandOrigin: ui
3:45:25 PM: publish: /opt/build/repo/build
3:45:25 PM: Caching artifacts
3:45:25 PM: Started saving node modules

Hey i am still getting the problem. i tried CI= npm run build but it still didnt work.

Here is the error, please help.

9:38:54 PM: Starting build script

9:38:54 PM: Installing dependencies

9:38:54 PM: Python version set to 2.7

9:38:56 PM: v12.18.0 is already installed.

9:38:56 PM: Now using node v12.18.0 (npm v6.14.4)

9:38:57 PM: Started restoring cached build plugins

9:38:57 PM: Finished restoring cached build plugins

9:38:57 PM: Attempting ruby version 2.7.1, read from environment

9:38:58 PM: Using ruby version 2.7.1

9:38:59 PM: Using PHP version 5.6

9:38:59 PM: 5.2 is already installed.

9:38:59 PM: Using Swift version 5.2

9:38:59 PM: Started restoring cached node modules

9:38:59 PM: Finished restoring cached node modules

9:38:59 PM: Installing NPM modules using NPM version 6.14.4

9:39:41 PM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js

9:39:41 PM: > node -e “try{require(’./postinstall’)}catch(e){}”

9:39:41 PM: > core-js@3.6.5 postinstall /opt/build/repo/node_modules/core-js

9:39:41 PM: > node -e “try{require(’./postinstall’)}catch(e){}”

9:39:41 PM: > core-js-pure@3.6.5 postinstall /opt/build/repo/node_modules/core-js-pure

9:39:41 PM: > node -e “try{require(’./postinstall’)}catch(e){}”

9:39:44 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):

9:39:44 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

9:39:44 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):

9:39:44 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

9:39:44 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/jest-haste-map/node_modules/fsevents):

9:39:44 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

9:39:44 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):

9:39:44 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

9:39:44 PM: added 1712 packages from 833 contributors and audited 1720 packages in 44.041s

9:39:46 PM: 67 packages are looking for funding

9:39:46 PM: run npm fund for details

9:39:46 PM: found 4997 low severity vulnerabilities

9:39:46 PM: run npm audit fix to fix them, or npm audit for details

9:39:46 PM: NPM modules installed

9:39:46 PM: Started restoring cached go cache

9:39:46 PM: Finished restoring cached go cache

9:39:46 PM: go version go1.14.4 linux/amd64

9:39:46 PM: go version go1.14.4 linux/amd64

9:39:46 PM: Installing missing commands

9:39:46 PM: Verify run directory

9:39:48 PM: ​

9:39:48 PM: ┌─────────────────────────────┐

9:39:48 PM: │ Netlify Build │

9:39:48 PM: └─────────────────────────────┘

9:39:48 PM: ​

9:39:48 PM: ❯ Version

9:39:48 PM: @netlify/build 3.0.1

9:39:48 PM: ​

9:39:48 PM: ❯ Flags

9:39:48 PM: deployId: 5f2689a3bc72d8e9a74fb498

9:39:48 PM: mode: buildbot

9:39:48 PM: ​

9:39:48 PM: ❯ Current directory

9:39:48 PM: /opt/build/repo

9:39:48 PM: ​

9:39:48 PM: ❯ Config file

9:39:48 PM: No config file was defined: using default values.

9:39:48 PM: ​

9:39:48 PM: ❯ Context

9:39:48 PM: production

9:39:48 PM: ​

9:39:48 PM: ┌───────────────────────────────────┐

9:39:48 PM: │ 1. Build command from Netlify app │

9:39:48 PM: └───────────────────────────────────┘

9:39:48 PM: ​

9:39:48 PM: $ CI= npm run build

9:39:48 PM: > little-rock@0.1.0 build /opt/build/repo

9:39:48 PM: > react-scripts build

9:39:49 PM: Creating an optimized production build…

9:39:53 PM: Failed to compile.

9:39:53 PM:

9:39:53 PM: ./src/App.js

9:39:53 PM: Cannot find module: ‘react-router-dom’. Make sure this package is installed.

9:39:53 PM: You can install this package by running: npm install react-router-dom.

9:39:53 PM: npm ERR! code ELIFECYCLE

9:39:53 PM: npm ERR! errno 1

9:39:53 PM: npm ERR! little-rock@0.1.0 build: react-scripts build

9:39:53 PM: npm ERR! Exit status 1

9:39:53 PM: npm ERR!

9:39:53 PM: npm ERR! Failed at the little-rock@0.1.0 build script.

9:39:53 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

9:39:53 PM: npm ERR! A complete log of this run can be found in:

9:39:53 PM: npm ERR! /opt/buildhome/.npm/_logs/2020-08-02T09_39_53_749Z-debug.log

9:39:53 PM:

9:39:53 PM: If the build failed with a warning about “process.env.CI = true”, this is due to “create-react-app” treating warnings as errors when in CI. In order to fix this problem, please either:

9:39:53 PM: - Fix the issues highlighted by the warnings above.

9:39:53 PM: - Or modify the “scripts.build” command in your “package.json” from “react-scripts build” to “CI= react-scripts build”

9:39:53 PM: More information can be found at https://docs.netlify.com/configure-builds/troubleshooting-tips/#build-fails-on-warning-message

9:39:53 PM: ​

9:39:53 PM: ┌─────────────────────────────┐

9:39:53 PM: │ “build.command” failed │

9:39:53 PM: └─────────────────────────────┘

9:39:53 PM: ​

9:39:53 PM: Error message

9:39:53 PM: Command failed with exit code 1: CI= npm run build

9:39:53 PM: ​

9:39:53 PM: Error location

9:39:53 PM: In Build command from Netlify app:

9:39:53 PM: CI= npm run build

9:39:53 PM: ​

9:39:53 PM: Resolved config

9:39:53 PM: build:

9:39:53 PM: command: CI= npm run build

9:39:53 PM: commandOrigin: ui

9:39:53 PM: publish: /opt/build/repo/build

9:39:53 PM: Caching artifacts

9:39:53 PM: Started saving node modules

9:39:53 PM: Finished saving node modules

9:39:53 PM: Started saving build plugins

9:39:53 PM: Finished saving build plugins

9:39:53 PM: Started saving pip cache

That’s your issue. Make sure you’re installing this dependency!