I'm getting this failed message from my builds

I’m getting this failed message, and I am not that tech-savvy. May some please help?
I’ve tried deleting my npm modules, lock files, and then rebuilding, but it still fails.
Attached are the logs:

5:55:20 PM: Build ready to start

5:55:22 PM: build-image version: 3031d4c9e432fd7016f6279fc9ad706f9205d845

5:55:22 PM: build-image tag: v3.3.17

5:55:22 PM: buildbot version: da42b14a989873e00cc6f36bc354c01953474181

5:55:22 PM: Fetching cached dependencies

5:55:22 PM: Starting to download cache of 254.3KB

5:55:22 PM: Finished downloading cache in 78.792696ms

5:55:22 PM: Starting to extract cache

5:55:22 PM: Failed to fetch cache, continuing with build

5:55:22 PM: Starting to prepare the repo for build

5:55:22 PM: No cached dependencies found. Cloning fresh repo

5:55:22 PM: git clone https://github.com/akorkor/PortfolioTwo

5:55:25 PM: Preparing Git Reference refs/heads/master

5:55:27 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'build' versus 'build/' in the Netlify UI

5:55:27 PM: Starting build script

5:55:27 PM: Installing dependencies

5:55:27 PM: Python version set to 2.7

5:55:29 PM: Downloading and installing node v10.21.0...

5:55:29 PM: Downloading https://nodejs.org/dist/v10.21.0/node-v10.21.0-linux-x64.tar.xz...

5:55:29 PM: Computing checksum with sha256sum

5:55:29 PM: Checksums matched!

5:55:32 PM: Now using node v10.21.0 (npm v6.14.4)

5:55:32 PM: Started restoring cached build plugins

5:55:32 PM: Finished restoring cached build plugins

5:55:32 PM: Attempting ruby version 2.6.2, read from environment

5:55:34 PM: Using ruby version 2.6.2

5:55:34 PM: Using PHP version 5.6

5:55:34 PM: 5.2 is already installed.

5:55:34 PM: Using Swift version 5.2

5:55:34 PM: Started restoring cached node modules

5:55:34 PM: Finished restoring cached node modules

5:55:35 PM: Installing NPM modules using NPM version 6.14.4

5:56:18 PM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js

5:56:18 PM: > node -e "try{require('./postinstall')}catch(e){}"

5:56:19 PM: > core-js@3.6.5 postinstall /opt/build/repo/node_modules/core-js

5:56:19 PM: > node -e "try{require('./postinstall')}catch(e){}"

5:56:19 PM: > core-js-pure@3.6.5 postinstall /opt/build/repo/node_modules/core-js-pure

5:56:19 PM: > node -e "try{require('./postinstall')}catch(e){}"

5:56:21 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):

5:56:21 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

5:56:21 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):

5:56:21 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

5:56:21 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/jest-haste-map/node_modules/fsevents):

5:56:21 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

5:56:21 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):

5:56:21 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

5:56:21 PM: added 1771 packages from 849 contributors and audited 1778 packages in 45.548s

5:56:23 PM: 55 packages are looking for funding

5:56:23 PM: run `npm fund` for details

5:56:23 PM: found 1 low severity vulnerability

5:56:23 PM: run `npm audit fix` to fix them, or `npm audit` for details

5:56:23 PM: NPM modules installed

5:56:23 PM: Started restoring cached go cache

5:56:23 PM: Finished restoring cached go cache

5:56:23 PM: Installing Go version 1.12

5:56:29 PM: unset GOOS;

5:56:29 PM: unset GOARCH;

5:56:29 PM: export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64';

5:56:29 PM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64/bin:${PATH}";

5:56:29 PM: go version >&2;

5:56:29 PM: export GIMME_ENV="/opt/buildhome/.gimme_cache/env/go1.12.linux.amd64.env"

5:56:29 PM: go version go1.12 linux/amd64

5:56:29 PM: Installing missing commands

5:56:29 PM: Verify run directory

5:56:30 PM: ​

5:56:30 PM: ┌─────────────────────────────┐

5:56:30 PM: │ Netlify Build │

5:56:30 PM: └─────────────────────────────┘

5:56:30 PM: ​

5:56:30 PM: ❯ Version

5:56:30 PM: @netlify/build 2.0.10

5:56:30 PM: ​

5:56:30 PM: ❯ Flags

5:56:30 PM: deployId: 5eebe2c86c3f1b23aa87e91c

5:56:30 PM: mode: buildbot

5:56:30 PM: ​

5:56:30 PM: ❯ Current directory

5:56:30 PM: /opt/build/repo

5:56:30 PM: ​

5:56:30 PM: ❯ Config file

5:56:30 PM: No config file was defined: using default values.

5:56:30 PM: ​

5:56:30 PM: ❯ Context

5:56:30 PM: production

5:56:30 PM: ​

5:56:30 PM: ┌────────────────────────────────┐

5:56:30 PM: │ 1. Build command from settings │

5:56:30 PM: └────────────────────────────────┘

5:56:30 PM: ​

5:56:30 PM: $ npm run build

5:56:30 PM: > portfolio-v3-react@0.1.0 build /opt/build/repo

5:56:30 PM: > react-scripts build

5:56:32 PM: Creating an optimized production build...

5:56:51 PM:

5:56:51 PM: Treating warnings as errors because process.env.CI = true.

5:56:51 PM: Most CI servers set it automatically.

5:56:51 PM:

5:56:51 PM: Failed to compile.

5:56:51 PM:

Hey @b90aladin and welcome to the community! :wave:

It looks like all your pre-build steps run without issue (cloning repo, initializing environment, installing dependencies), so removing node_modules, package.json, or any of the lock files shouldn’t have any impact. One curious thing I’ve noticed is:

5:55:27 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘build’ versus ‘build/’ in the Netlify UI

as well as:

5:56:30 PM: ❯ Config file
5:56:30 PM: No config file was defined: using default values.

in the logs. I’d double-check to make sure that your configuration is set to get the build script to the right directory and to execute the right files first, although that might also not have a significant impact.

More pertinent however, is the npm run build command at the end, which appears to exit with a compilation failure. Have you tried running the build locally to see if a result is produced? If so, there may be a configuration change when going from development to production that doesn’t produce the expected result, so it could be a configuration issue.

If you cannot get a build to run locally then I would probably look into determining whether your code is at fault, or if the developer of the build tools you’re using has an uncaught bug in there software.

Best of luck!

Thank you for the response! It turns the issue was that I had to add the CI"" to build command in settings to get it to work.

1 Like

Awesome! Glad it worked out :slight_smile: