Getting Delpoy Error

I tried to delopy app but getting error:

2:08:46 AM: Build ready to start
2:08:47 AM: build-image version: 53b83b6bede2920f236b25b6f5a95334320dc849
2:08:47 AM: build-image tag: v3.6.0
2:08:47 AM: buildbot version: 8ae026ef4905d9174e416775c6b64aa19950569b
2:08:48 AM: Fetching cached dependencies
2:08:48 AM: Starting to download cache of 122.1MB
2:08:51 AM: Finished downloading cache in 3.138031294s
2:08:51 AM: Starting to extract cache
2:08:55 AM: Finished extracting cache in 4.199099129s
2:08:55 AM: Finished fetching cache in 7.378960864s
2:08:55 AM: Starting to prepare the repo for build
2:08:55 AM: Preparing Git Reference refs/heads/master
2:08:57 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘build’ versus ‘build/’ in the Netlify UI
2:08:57 AM: Starting build script
2:08:57 AM: Installing dependencies
2:08:57 AM: Python version set to 2.7
2:08:57 AM: Started restoring cached node version
2:09:00 AM: Finished restoring cached node version
2:09:00 AM: v12.18.0 is already installed.
2:09:01 AM: Now using node v12.18.0 (npm v6.14.4)
2:09:01 AM: Started restoring cached build plugins
2:09:01 AM: Finished restoring cached build plugins
2:09:01 AM: Attempting ruby version 2.7.1, read from environment
2:09:02 AM: Using ruby version 2.7.1
2:09:02 AM: Using PHP version 5.6
2:09:02 AM: Started restoring cached node modules
2:09:02 AM: Finished restoring cached node modules
2:09:02 AM: Started restoring cached go cache
2:09:02 AM: Finished restoring cached go cache
2:09:03 AM: go version go1.14.4 linux/amd64
2:09:03 AM: go version go1.14.4 linux/amd64
2:09:03 AM: Installing missing commands
2:09:03 AM: Verify run directory
2:09:04 AM: ​
2:09:04 AM: ────────────────────────────────────────────────────────────────
2:09:04 AM: Netlify Build
2:09:04 AM: ────────────────────────────────────────────────────────────────
2:09:04 AM: ​
2:09:04 AM: ❯ Version
2:09:04 AM: @netlify/build 8.0.0
2:09:04 AM: ​
2:09:04 AM: ❯ Flags
2:09:04 AM: deployId: 5fde6bdeea9c7806ee0ce610
2:09:04 AM: mode: buildbot
2:09:04 AM: ​
2:09:04 AM: ❯ Current directory
2:09:04 AM: /opt/build/repo
2:09:04 AM: ​
2:09:04 AM: ❯ Config file
2:09:04 AM: No config file was defined: using default values.
2:09:04 AM: ​
2:09:04 AM: ❯ Context
2:09:04 AM: production
2:09:04 AM: ​
2:09:04 AM: ────────────────────────────────────────────────────────────────
2:09:04 AM: 1. Build command from Netlify app
2:09:04 AM: ────────────────────────────────────────────────────────────────
2:09:04 AM: ​
2:09:04 AM: $ npm run build
2:09:04 AM: > portfolio@0.1.0 build /opt/build/repo
2:09:04 AM: > react-scripts build
2:09:05 AM: Creating an optimized production build…
2:09:07 AM: Failed to compile.
2:09:07 AM:
2:09:07 AM: ./src/containers/projects-section.js
2:09:07 AM: Cannot find file ‘…/components/publications’ in ‘./src/containers’.
2:09:07 AM: npm ERR! code ELIFECYCLE
2:09:07 AM: npm ERR! errno 1
2:09:07 AM: npm ERR! portfolio@0.1.0 build: react-scripts build
2:09:07 AM: npm ERR! Exit status 1
2:09:07 AM: npm ERR!
2:09:07 AM: npm ERR! Failed at the portfolio@0.1.0 build script.
2:09:07 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2:09:07 AM: npm ERR! A complete log of this run can be found in:
2:09:07 AM: npm ERR! /opt/buildhome/.npm/_logs/2020-12-19T21_09_07_507Z-debug.log
2:09:07 AM: ​
2:09:07 AM: ────────────────────────────────────────────────────────────────
2:09:07 AM: “build.command” failed
2:09:07 AM: ────────────────────────────────────────────────────────────────
2:09:07 AM: ​
2:09:07 AM: Error message
2:09:07 AM: Command failed with exit code 1: npm run build
2:09:07 AM: ​
2:09:07 AM: Error location
2:09:07 AM: In Build command from Netlify app:
2:09:07 AM: npm run build
2:09:07 AM: ​
2:09:07 AM: Resolved config
2:09:07 AM: build:
2:09:07 AM: command: npm run build
2:09:07 AM: commandOrigin: ui
2:09:07 AM: publish: /opt/build/repo/build
2:09:07 AM: Caching artifacts
2:09:07 AM: Started saving node modules
2:09:07 AM: Finished saving node modules
2:09:07 AM: Started saving build plugins
2:09:07 AM: Finished saving build plugins
2:09:07 AM: Started saving pip cache
2:09:07 AM: Finished saving pip cache
2:09:07 AM: Started saving emacs cask dependencies
2:09:07 AM: Finished saving emacs cask dependencies
2:09:07 AM: Started saving maven dependencies
2:09:07 AM: Finished saving maven dependencies
2:09:07 AM: Started saving boot dependencies
2:09:07 AM: Finished saving boot dependencies
2:09:07 AM: Started saving rust rustup cache
2:09:07 AM: Finished saving rust rustup cache
2:09:07 AM: Started saving rust cargo bin cache
2:09:07 AM: Finished saving rust cargo bin cache
2:09:07 AM: Started saving go dependencies
2:09:07 AM: Finished saving go dependencies
2:09:07 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:09:07 AM: Failing build: Failed to build site
2:09:07 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
2:09:07 AM: Finished processing build request in 19.974486692s

If you run npm run build locally, that should point you in the right direction and help you debug the issue.

Cannot find file ‘…/components/publications’ in ‘./src/containers’.

1 Like

agreed, this is likely the cause of your error.

if the site builds locally but not on netlify, it may be a case issue:

Can you give this a read through and let us know if that fixes the issue?