Build fails on Netlify, works locally

Hi,

I’m getting an error saying it can’t find a resource (page file). I’m looking at the file, so I know it’s there. This is happening on both the develop and main branch. Both builds run successfully locally though. What am I missing? I’ve cleared cache, but still no luck.

10:24:35 AM: Build ready to start
10:24:37 AM: build-image version: c23500190e408b04bdfcf9703d16c460ef03b813
10:24:37 AM: build-image tag: v3.3.15
10:24:37 AM: buildbot version: 85ab9be17c6555a1d991d1cf7b0dbb73c18d0b92
10:24:37 AM: Fetching cached dependencies
10:24:37 AM: Starting to download cache of 254.3KB
10:24:37 AM: Finished downloading cache in 142.6428ms
10:24:37 AM: Starting to extract cache
10:24:37 AM: Failed to fetch cache, continuing with build
10:24:37 AM: Starting to prepare the repo for build
10:24:38 AM: No cached dependencies found. Cloning fresh repo
10:24:38 AM: git clone https://github.com/drewclem/protege
10:24:39 AM: Preparing Git Reference refs/heads/master
10:24:40 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'build' versus 'build/' in the Netlify UI
10:24:40 AM: Starting build script
10:24:40 AM: Installing dependencies
10:24:40 AM: Python version set to 2.7
10:24:41 AM: Downloading and installing node v10.21.0...
10:24:42 AM: Downloading https://nodejs.org/dist/v10.21.0/node-v10.21.0-linux-x64.tar.xz...
10:24:42 AM: Computing checksum with sha256sum
10:24:42 AM: Checksums matched!
10:24:45 AM: Now using node v10.21.0 (npm v6.14.4)
10:24:45 AM: Started restoring cached build plugins
10:24:45 AM: Finished restoring cached build plugins
10:24:45 AM: Attempting ruby version 2.6.2, read from environment
10:24:47 AM: Using ruby version 2.6.2
10:24:47 AM: Using PHP version 5.6
10:24:47 AM: 5.2 is already installed.
10:24:47 AM: Using Swift version 5.2
10:24:47 AM: Started restoring cached node modules
10:24:47 AM: Finished restoring cached node modules
10:24:48 AM: Installing NPM modules using NPM version 6.14.4
10:25:29 AM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
10:25:29 AM: > node -e "try{require('./postinstall')}catch(e){}"
10:25:29 AM: > core-js@3.6.4 postinstall /opt/build/repo/node_modules/core-js
10:25:29 AM: > node -e "try{require('./postinstall')}catch(e){}"
10:25:30 AM: > core-js-pure@3.6.4 postinstall /opt/build/repo/node_modules/core-js-pure
10:25:30 AM: > node -e "try{require('./postinstall')}catch(e){}"
10:25:30 AM: > protobufjs@6.8.9 postinstall /opt/build/repo/node_modules/protobufjs
10:25:30 AM: > node scripts/postinstall
10:25:30 AM: > cypress@4.4.1 postinstall /opt/build/repo/node_modules/cypress
10:25:30 AM: > node index.js --exec install
10:25:31 AM: Installing Cypress (version: 4.4.1)
10:25:31 AM: 
10:25:31 AM: [14:25:31]  Downloading Cypress     [started]
10:25:35 AM: [14:25:35]  Downloading Cypress     [completed]
10:25:35 AM: [14:25:35]  Unzipping Cypress       [started]
10:25:47 AM: [14:25:47]  Unzipping Cypress       [completed]
10:25:47 AM: [14:25:47]  Finishing Installation  [started]
10:25:47 AM: [14:25:47]  Finishing Installation  [completed]
10:25:47 AM: 
10:25:48 AM: You can now open Cypress by running: node_modules/.bin/cypress open
10:25:48 AM: https://on.cypress.io/installing-cypress
10:25:48 AM: 
10:25:51 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/webpack-dev-server/node_modules/fsevents):
10:25:51 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:25:51 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/watchpack/node_modules/fsevents):
10:25:51 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:25:51 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/jest-haste-map/node_modules/fsevents):
10:25:51 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:25:51 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
10:25:51 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:25:51 AM: added 1917 packages from 1047 contributors and audited 2125 packages in 61.93s
10:25:53 AM: 55 packages are looking for funding
10:25:53 AM:   run `npm fund` for details
10:25:53 AM: found 5 vulnerabilities (4 low, 1 high)
10:25:53 AM:   run `npm audit fix` to fix them, or `npm audit` for details
10:25:53 AM: NPM modules installed
10:25:53 AM: Started restoring cached go cache
10:25:53 AM: Finished restoring cached go cache
10:25:53 AM: go version go1.12 linux/amd64
10:25:54 AM: go version go1.12 linux/amd64
10:25:54 AM: Installing missing commands
10:25:54 AM: Verify run directory
10:25:55 AM: ​
10:25:55 AM: ┌─────────────────────────────┐
10:25:55 AM: │        Netlify Build        │
10:25:55 AM: └─────────────────────────────┘
10:25:55 AM: ​
10:25:55 AM: ❯ Version
10:25:55 AM:   @netlify/build 2.0.10
10:25:55 AM: ​
10:25:55 AM: ❯ Flags
10:25:55 AM:   deployId: 5eea27a3141d2784b1672257
10:25:55 AM:   mode: buildbot
10:25:55 AM: ​
10:25:55 AM: ❯ Current directory
10:25:55 AM:   /opt/build/repo
10:25:55 AM: ​
10:25:55 AM: ❯ Config file
10:25:55 AM:   No config file was defined: using default values.
10:25:55 AM: ​
10:25:55 AM: ❯ Context
10:25:55 AM:   production
10:25:55 AM: ​
10:25:55 AM: ┌────────────────────────────────┐
10:25:55 AM: │ 1. Build command from settings │
10:25:55 AM: └────────────────────────────────┘
10:25:55 AM: ​
10:25:55 AM: $ npm run build
10:25:55 AM: > protege-client@0.1.0 build /opt/build/repo
10:25:55 AM: > npm run build:css && react-scripts build
10:25:56 AM: > protege-client@0.1.0 build:css /opt/build/repo
10:25:56 AM: > postcss src/assets/tailwind.css -o src/assets/main.css
10:26:00 AM: Creating an optimized production build...
10:26:02 AM: Failed to compile.
10:26:02 AM: 
10:26:02 AM: ./src/components/App.js
10:26:02 AM: Cannot find file '../pages/Thanks' in './src/components'.
10:26:02 AM: npm ERR! code ELIFECYCLE
10:26:02 AM: npm ERR! errno 1
10:26:02 AM: npm
10:26:02 AM: ERR!
10:26:02 AM:  protege-client@0.1.0 build: `npm run build:css && react-scripts build`
10:26:02 AM: npm
10:26:02 AM: ERR!
10:26:02 AM:  Exit status 1
10:26:02 AM: npm
10:26:02 AM: ERR!
10:26:02 AM: npm
10:26:02 AM: ERR!
10:26:02 AM:  Failed at the protege-client@0.1.0 build script.
10:26:02 AM: npm
10:26:02 AM: ERR!
10:26:02 AM:  This is probably not a problem with npm. There is likely additional logging output above.
10:26:02 AM: npm
10:26:02 AM: ERR! A complete log of this run can be found in:
10:26:02 AM: npm ERR!
10:26:02 AM:      /opt/buildhome/.npm/_logs/2020-06-17T14_26_02_631Z-debug.log
10:26:02 AM: ​
10:26:02 AM: ┌─────────────────────────────┐
10:26:02 AM: │   "build.command" failed    │
10:26:02 AM: └─────────────────────────────┘
10:26:02 AM: ​
10:26:02 AM:   Error message
10:26:02 AM:   Command failed with exit code 1: npm run build
10:26:02 AM: ​
10:26:02 AM:   Error location
10:26:02 AM:   In Build command from settings:
10:26:02 AM:   npm run build
10:26:02 AM: ​
10:26:02 AM:   Resolved config
10:26:02 AM:   build:
10:26:02 AM:     command: npm run build
10:26:02 AM:     publish: /opt/build/repo/build
10:26:02 AM: Caching artifacts
10:26:02 AM: Started saving node modules
10:26:02 AM: Finished saving node modules
10:26:02 AM: Started saving build plugins
10:26:02 AM: Finished saving build plugins
10:26:02 AM: Started saving pip cache
10:26:09 AM: Finished saving pip cache
10:26:09 AM: Started saving emacs cask dependencies
10:26:09 AM: Finished saving emacs cask dependencies
10:26:09 AM: Started saving maven dependencies
10:26:09 AM: Finished saving maven dependencies
10:26:09 AM: Started saving boot dependencies
10:26:09 AM: Finished saving boot dependencies
10:26:09 AM: Started saving go dependencies
10:26:09 AM: Finished saving go dependencies
10:26:13 AM: Error running command: Build script returned non-zero exit code: 1
10:26:13 AM: Failing build: Failed to build site
10:26:13 AM: Failed during stage 'building site': Build script returned non-zero exit code: 1
10:26:13 AM: Finished processing build request in 1m35.491569531s

Hey there, thanks for reaching out.

What you are describing sounds a bit like a an issue with case sensitivity on our system.

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

Hey Perry,

Thank you for this. I’d actually already read through this article and thought I had covered all of my bases on this front. Turns out that I was experiencing an instance where Github wasn’t updating the case changes to filenames.

Thank you!

1 Like