Create-react-app build failure

My react app which I bootstrapped with create-react-app fails to build.
I have default settings.

2:16:49 PM: Build ready to start
2:16:51 PM: build-image version: c23500190e408b04bdfcf9703d16c460ef03b813
2:16:51 PM: build-image tag: v3.3.15
2:16:51 PM: buildbot version: 85ab9be17c6555a1d991d1cf7b0dbb73c18d0b92
2:16:51 PM: Fetching cached dependencies
2:16:51 PM: Failed to fetch cache, continuing with build
2:16:51 PM: Starting to prepare the repo for build
2:16:51 PM: No cached dependencies found. Cloning fresh repo
2:16:51 PM: git clone GitHub - Victor-El/covid-19: An open source project for COVID-19
2:16:52 PM: Preparing Git Reference refs/heads/master
2:16:53 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘build’ versus ‘build/’ in the Netlify UI
2:16:53 PM: Starting build script
2:16:53 PM: Installing dependencies
2:16:53 PM: Python version set to 2.7
2:16:54 PM: Downloading and installing node v10.21.0…
2:16:55 PM: Downloading https://nodejs.org/dist/v10.21.0/node-v10.21.0-linux-x64.tar.xz
2:16:55 PM: Computing checksum with sha256sum
2:16:55 PM: Checksums matched!
2:16:58 PM: Now using node v10.21.0 (npm v6.14.4)
2:16:58 PM: Started restoring cached build plugins
2:16:58 PM: Finished restoring cached build plugins
2:16:58 PM: Attempting ruby version 2.6.2, read from environment
2:16:59 PM: Using ruby version 2.6.2
2:16:59 PM: Using PHP version 5.6
2:16:59 PM: 5.2 is already installed.
2:16:59 PM: Using Swift version 5.2
2:16:59 PM: Started restoring cached node modules
2:16:59 PM: Finished restoring cached node modules
2:17:00 PM: Found npm version (6.14.4) that doesn’t match expected (6.14.5)
2:17:00 PM: Installing npm at version 6.14.5
2:17:07 PM: /opt/buildhome/.nvm/versions/node/v10.21.0/bin/npm → /opt/buildhome/.nvm/versions/node/v10.21.0/lib/node_modules/npm/bin/npm-cli.js
2:17:07 PM: /opt/buildhome/.nvm/versions/node/v10.21.0/bin/npx → /opt/buildhome/.nvm/versions/node/v10.21.0/lib/node_modules/npm/bin/npx-cli.js
2:17:07 PM: + npm@6.14.5
2:17:07 PM: updated 5 packages in 6.792s
2:17:07 PM: NPM installed successfully
2:17:08 PM: Installing NPM modules using NPM version 6.14.5
2:17:34 PM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
2:17:34 PM: > node -e “try{require(‘./postinstall’)}catch(e){}”
2:17:34 PM: > core-js@3.6.4 postinstall /opt/build/repo/node_modules/core-js
2:17:34 PM: > node -e “try{require(‘./postinstall’)}catch(e){}”
2:17:34 PM: > core-js-pure@3.6.4 postinstall /opt/build/repo/node_modules/core-js-pure
2:17:34 PM: > node -e “try{require(‘./postinstall’)}catch(e){}”
2:17:37 PM: npm WARN
2:17:37 PM: optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/webpack-dev-server/node_modules/fsevents):
2:17:37 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
2:17:37 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/watchpack/node_modules/fsevents):
2:17:37 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
2:17:37 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/jest-haste-map/node_modules/fsevents):
2:17:37 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
2:17:37 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
2:17:37 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
2:17:37 PM: added 1649 packages from 808 contributors and audited 1851 packages in 28.506s
2:17:38 PM: 57 packages are looking for funding
2:17:38 PM: run npm fund for details
2:17:38 PM: found 2 vulnerabilities (1 low, 1 high)
2:17:38 PM: run npm audit fix to fix them, or npm audit for details
2:17:38 PM: NPM modules installed
2:17:39 PM: Started restoring cached go cache
2:17:39 PM: Finished restoring cached go cache
2:17:39 PM: go version go1.12 linux/amd64
2:17:39 PM: go version go1.12 linux/amd64
2:17:39 PM: Installing missing commands
2:17:39 PM: Verify run directory
2:17:40 PM: ​
2:17:40 PM: ┌─────────────────────────────┐
2:17:40 PM: │ Netlify Build │
2:17:40 PM: └─────────────────────────────┘
2:17:40 PM: ​
2:17:40 PM: ❯ Version
2:17:40 PM: @netlify/build 2.0.10
2:17:40 PM: ​
2:17:40 PM: ❯ Flags
2:17:40 PM: deployId: 5eea17c11f223c62aaa85a31
2:17:40 PM: mode: buildbot
2:17:40 PM: ​
2:17:40 PM: ❯ Current directory
2:17:40 PM: /opt/build/repo
2:17:40 PM: ​
2:17:40 PM: ❯ Config file
2:17:40 PM: No config file was defined: using default values.
2:17:40 PM: ​
2:17:40 PM: ❯ Context
2:17:40 PM: production
2:17:40 PM: ​
2:17:40 PM: ┌────────────────────────────────┐
2:17:40 PM: │ 1. Build command from settings │
2:17:40 PM: └────────────────────────────────┘
2:17:40 PM: ​
2:17:40 PM: $ npm run build
2:17:40 PM: > covid-19@0.1.0 build /opt/build/repo
2:17:40 PM: > react-scripts build
2:17:42 PM: Creating an optimized production build…
2:18:18 PM:
2:18:18 PM: Treating warnings as errors because process.env.CI = true.
2:18:18 PM: Most CI servers set it automatically.
2:18:18 PM:
2:18:18 PM: Failed to compile.
2:18:18 PM:
2:18:18 PM: ./src/components/FooterNav.js
2:18:18 PM: Line 11:5: Useless constructor no-useless-constructor
2:18:18 PM: ./src/components/MapView.js
2:18:18 PM: Line 18:17:

I believe it’s because of this. I’m having the same issue but with a different error.

1 Like

hey @Victor-El - @drewclem is correct. You should find that article relevant!

1 Like

Thank you very much, it helped.