Home
Support Forums

Build.command failed

HELLO, guys I am new here please help me out with this issue. thanks in advcance

────────────────────────────────────────────────────────────────
2:09:08 PM: Netlify Build
2:09:08 PM: ────────────────────────────────────────────────────────────────
2:09:08 PM: ​
2:09:08 PM: ❯ Version
2:09:08 PM: @netlify/build 8.0.0
2:09:08 PM: ​
2:09:08 PM: ❯ Flags
2:09:08 PM: deployId: 5ff464c042809f05bf71ef77
2:09:08 PM: mode: buildbot
2:09:08 PM: ​
2:09:08 PM: ❯ Current directory
2:09:08 PM: /opt/build/repo
2:09:08 PM: ​
2:09:08 PM: ❯ Config file
2:09:08 PM: No config file was defined: using default values.
2:09:08 PM: ​
2:09:08 PM: ❯ Context
2:09:08 PM: production
2:09:08 PM: ​
2:09:08 PM: ────────────────────────────────────────────────────────────────
2:09:08 PM: 1. Build command from Netlify app
2:09:08 PM: ────────────────────────────────────────────────────────────────
2:09:08 PM: ​
2:09:08 PM: $ npm run build
2:09:08 PM: > yahtzee@0.1.0 build /opt/build/repo
2:09:08 PM: > react-scripts build
2:09:10 PM: Creating an optimized production build…
2:09:22 PM:
2:09:22 PM: Treating warnings as errors because process.env.CI = true.
2:09:22 PM: Most CI servers set it automatically.
2:09:22 PM:
2:09:22 PM: Failed to compile.
2:09:22 PM:
2:09:22 PM: ./src/Rules.js
2:09:22 PM: Line 74: Unexpected mix of ‘&&’ and ‘||’ no-mixed-operators
2:09:22 PM: Line 74: Unexpected mix of ‘&&’ and ‘||’ no-mixed-operators
2:09:22 PM: Line 76: Unexpected mix of ‘&&’ and ‘||’ no-mixed-operators
2:09:22 PM: Line 76: Unexpected mix of ‘&&’ and ‘||’ no-mixed-operators
2:09:22 PM: ./src/Die.js
2:09:22 PM: Line 9: Useless constructor no-useless-constructor
2:09:22 PM: npm ERR! code ELIFECYCLE
2:09:22 PM: npm ERR! errno 1
2:09:22 PM: npm ERR! yahtzee@0.1.0 build: react-scripts build
2:09:22 PM: npm ERR! Exit status 1
2:09:22 PM: npm ERR!
2:09:22 PM: npm ERR! Failed at the yahtzee@0.1.0 build script.
2:09:22 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2:09:22 PM: npm ERR! A complete log of this run can be found in:
2:09:22 PM: npm ERR! /opt/buildhome/.npm/_logs/2021-01-05T13_09_22_678Z-debug.log
2:09:22 PM: ​
2:09:22 PM: ────────────────────────────────────────────────────────────────
2:09:22 PM: “build.command” failed
2:09:22 PM: ────────────────────────────────────────────────────────────────
2:09:22 PM: ​
2:09:22 PM: Error message
2:09:22 PM: Command failed with exit code 1: npm run build
2:09:22 PM: ​
2:09:22 PM: Error location
2:09:22 PM: In Build command from Netlify app:
2:09:22 PM: npm run build
2:09:22 PM: ​
2:09:22 PM: Resolved config
2:09:22 PM: build:
2:09:22 PM: command: npm run build
2:09:22 PM: commandOrigin: ui
2:09:22 PM: publish: /opt/build/repo/build
2:09:22 PM: Caching artifacts
2

Does this build fine locally?

Hiya, sorry you are having trouble with your build.

This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile:

We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!

If you are still having problems, please provide as much information as you can on what you have already tried, what your build settings are, your package.json, etc. Thanks!