Hi community, I need your help, Iβm trying to deploy an app React app created with create-react-app. but it always fails when I try run build through github.
NOTE: I try run build locally and upload manually and it works.
I would like to solve this to get project working via CI.
Thanks.
10:21:22 PM: Build ready to start
10:21:23 PM: build-image version: 09c2cdcdf242cf2f57c9ee0fcad9d298fad9ad41
10:21:23 PM: build-image tag: v3.5.0
10:21:23 PM: buildbot version: 8df8a50b1177b0b57364d20e0ea150448924cebf
10:21:23 PM: Fetching cached dependencies
10:21:23 PM: Failed to fetch cache, continuing with build
10:21:23 PM: Starting to prepare the repo for build
10:21:24 PM: No cached dependencies found. Cloning fresh repo
10:21:24 PM: git clone GitHub - Josuejoelmm/rick-and-morty
10:21:24 PM: Preparing Git Reference refs/heads/master
10:21:26 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: βbuildβ versus βbuild/β in the Netlify UI
10:21:26 PM: Starting build script
10:21:26 PM: Installing dependencies
10:21:26 PM: Python version set to 2.7
10:21:27 PM: v12.18.0 is already installed.
10:21:28 PM: Now using node v12.18.0 (npm v6.14.4)
10:21:28 PM: Started restoring cached build plugins
10:21:28 PM: Finished restoring cached build plugins
10:21:28 PM: Attempting ruby version 2.7.1, read from environment
10:21:29 PM: Using ruby version 2.7.1
10:21:30 PM: Using PHP version 5.6
10:21:30 PM: Started restoring cached node modules
10:21:30 PM: Finished restoring cached node modules
10:21:30 PM: Installing NPM modules using NPM version 6.14.4
10:22:02 PM: > node-sass@4.13.1 install /opt/build/repo/node_modules/node-sass
10:22:02 PM: > node scripts/install.js
10:22:02 PM: Downloading binary from https://github.com/sass/node-sass/releases/download/v4.13.1/linux-x64-72_binding.node
10:22:03 PM: Download complete
10:22:03 PM: Binary saved to /opt/build/repo/node_modules/node-sass/vendor/linux-x64-72/binding.node
10:22:03 PM: Caching binary to /opt/buildhome/.npm/node-sass/4.13.1/linux-x64-72_binding.node
10:22:03 PM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
10:22:03 PM: > node -e βtry{require(β./postinstallβ)}catch(e){}β
10:22:03 PM: > core-js@3.6.4 postinstall /opt/build/repo/node_modules/core-js
10:22:03 PM: > node -e βtry{require(β./postinstallβ)}catch(e){}β
10:22:04 PM: > node-sass@4.13.1 postinstall /opt/build/repo/node_modules/node-sass
10:22:04 PM: > node scripts/build.js
10:22:04 PM: Binary found at /opt/build/repo/node_modules/node-sass/vendor/linux-x64-72/binding.node
10:22:04 PM: Testing binary
10:22:05 PM: Binary is fine
10:22:07 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/webpack-dev-server/node_modules/fsevents):
10:22:07 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {βosβ:βdarwinβ,βarchβ:βanyβ} (current: {βosβ:βlinuxβ,βarchβ:βx64β})
10:22:07 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/watchpack/node_modules/fsevents):
10:22:07 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {βosβ:βdarwinβ,βarchβ:βanyβ} (current: {βosβ:βlinuxβ,βarchβ:βx64β})
10:22:07 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/jest-haste-map/node_modules/fsevents):
10:22:07 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {βosβ:βdarwinβ,βarchβ:βanyβ} (current: {βosβ:βlinuxβ,βarchβ:βx64β})
10:22:07 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
10:22:07 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {βosβ:βdarwinβ,βarchβ:βanyβ} (current: {βosβ:βlinuxβ,βarchβ:βx64β})
10:22:07 PM: added 1692 packages from 826 contributors and audited 1897 packages in 36.238s
10:22:09 PM: 48 packages are looking for funding
10:22:09 PM: run npm fund
for details
10:22:09 PM: found 3799 vulnerabilities (3785 low, 7 moderate, 7 high)
10:22:09 PM: run npm audit fix
to fix them, or npm audit
for details
10:22:09 PM: NPM modules installed
10:22:09 PM: Started restoring cached go cache
10:22:09 PM: Finished restoring cached go cache
10:22:09 PM: go version go1.14.4 linux/amd64
10:22:09 PM: go version go1.14.4 linux/amd64
10:22:09 PM: Installing missing commands
10:22:09 PM: Verify run directory
10:22:11 PM: β
10:22:11 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
10:22:11 PM: Netlify Build
10:22:11 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
10:22:11 PM: β
10:22:11 PM: β― Version
10:22:11 PM: @netlify/build 5.3.3
10:22:11 PM: β
10:22:11 PM: β― Flags
10:22:11 PM: deployId: 5fbdb191d41b501716013351
10:22:11 PM: mode: buildbot
10:22:11 PM: β
10:22:11 PM: β― Current directory
10:22:11 PM: /opt/build/repo
10:22:11 PM: β
10:22:11 PM: β― Config file
10:22:11 PM: No config file was defined: using default values.
10:22:11 PM: β
10:22:11 PM: β― Context
10:22:11 PM: production
10:22:11 PM: β
10:22:11 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
10:22:11 PM: 1. Build command from Netlify app
10:22:11 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
10:22:11 PM: β
10:22:11 PM: $ npm run build
10:22:11 PM: > rick-and-morty@0.1.0 build /opt/build/repo
10:22:11 PM: > react-scripts build
10:22:12 PM: Creating an optimized production buildβ¦
10:22:14 PM: Browserslist: caniuse-lite is outdated. Please run the following command: npm update
10:22:18 PM: Failed to compile.
10:22:18 PM:
10:22:18 PM: ./src/ui/components/NotFound.jsx
10:22:18 PM: Cannot find file ββ¦/β¦/ui/images/snowball.pngβ in β./src/ui/componentsβ.
10:22:18 PM: npm ERR! code ELIFECYCLE
10:22:18 PM: npm ERR! errno 1
10:22:18 PM: npm ERR! rick-and-morty@0.1.0 build: react-scripts build
10:22:18 PM: npm ERR! Exit status 1
10:22:18 PM: npm ERR!
10:22:18 PM: npm ERR! Failed at the rick-and-morty@0.1.0 build script.
10:22:18 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
10:22:18 PM: npm ERR! A complete log of this run can be found in:
10:22:18 PM: npm ERR! /opt/buildhome/.npm/_logs/2020-11-25T01_22_18_245Z-debug.log
10:22:18 PM: β
10:22:18 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
10:22:18 PM: βbuild.commandβ failed
10:22:18 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
10:22:18 PM: β
10:22:18 PM: Error message
10:22:18 PM: Command failed with exit code 1: npm run build
10:22:18 PM: β
10:22:18 PM: Error location
10:22:18 PM: In Build command from Netlify app:
10:22:18 PM: npm run build
10:22:18 PM: β
10:22:18 PM: Resolved config
10:22:18 PM: build:
10:22:18 PM: command: npm run build
10:22:18 PM: commandOrigin: ui
10:22:18 PM: publish: /opt/build/repo/build
10:22:18 PM: Caching artifacts
10:22:18 PM: Started saving node modules
10:22:18 PM: Finished saving node modules
10:22:18 PM: Started saving build plugins
10:22:18 PM: Finished saving build plugins
10:22:18 PM: Started saving pip cache
10:22:18 PM: Finished saving pip cache
10:22:18 PM: Started saving emacs cask dependencies
10:22:18 PM: Finished saving emacs cask dependencies
10:22:18 PM: Started saving maven dependencies
10:22:18 PM: Finished saving maven dependencies
10:22:18 PM: Started saving boot dependencies
10:22:18 PM: Finished saving boot dependencies
10:22:18 PM: Started saving go dependencies
10:22:18 PM: Finished saving go dependencies
10:22:21 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:22:21 PM: Failing build: Failed to build site
10:22:21 PM: Failed during stage βbuilding siteβ: Build script returned non-zero exit code: 2
10:22:21 PM: Finished processing build request in 57.739418923s