Home
Support Forums

Having the darndest time deploying my app

PLEASE help us help you by writing a good post!

  • we need to know your netlify site name. Example: gifted-antelope-58b104.netlify.app
  • Build problems? Link or paste the FULL build log & build settings screenshot

The better the post - the faster the answer.

Site address: compassionate-borg-673e97.netlify.app

Logs from most recent build

6:17:44 AM: Build ready to start
6:17:46 AM: build-image version: 2cee85eb7f808bf3b6e87378c5307f9411f0a332
6:17:46 AM: build-image tag: v3.8.0
6:17:46 AM: buildbot version: 50f65aefac6a0b0332883c4b4311845d6395ce2b
6:17:46 AM: Fetching cached dependencies
6:17:46 AM: Failed to fetch cache, continuing with build
6:17:46 AM: Starting to prepare the repo for build
6:17:47 AM: No cached dependencies found. Cloning fresh repo
6:17:47 AM: git clone https://github.com/robpedersendev/wildthorns
6:17:48 AM: Preparing Git Reference refs/heads/main
6:17:48 AM: Parsing package.json dependencies
6:17:49 AM: Different build dir detected, going to use the one specified in the Netlify configuration file: 'app' versus '/app/' in the Netlify UI
6:17:49 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'app' versus '' in the Netlify UI
6:17:49 AM: Starting build script
6:17:49 AM: Installing dependencies
6:17:49 AM: Python version set to 2.7
6:17:50 AM: v12.18.0 is already installed.
6:17:50 AM: Now using node v12.18.0 (npm v6.14.4)
6:17:51 AM: Started restoring cached build plugins
6:17:51 AM: Finished restoring cached build plugins
6:17:51 AM: Attempting ruby version 2.7.2, read from environment
6:17:52 AM: Using ruby version 2.7.2
6:17:52 AM: Using PHP version 5.6
6:17:52 AM: Started restoring cached node modules
6:17:52 AM: Finished restoring cached node modules
6:17:53 AM: Installing NPM modules using NPM version 6.14.4
6:17:54 AM: npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
6:18:00 AM: npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
6:18:05 AM: npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
6:18:05 AM: npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
6:18:06 AM: npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
6:18:06 AM: npm WARN deprecated rollup-plugin-babel@4.4.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
6:18:08 AM: npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
6:18:10 AM: npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
6:18:10 AM: npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
6:18:10 AM: npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
6:18:10 AM: npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
6:18:11 AM: npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
6:18:13 AM: npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
6:18:38 AM: > core-js@2.6.12 postinstall /opt/build/repo/app/node_modules/babel-runtime/node_modules/core-js
6:18:38 AM: > node -e "try{require('./postinstall')}catch(e){}"
6:18:38 AM: > core-js@3.15.0 postinstall /opt/build/repo/app/node_modules/core-js
6:18:38 AM: > node -e "try{require('./postinstall')}catch(e){}"
6:18:38 AM: > core-js-pure@3.15.0 postinstall /opt/build/repo/app/node_modules/core-js-pure
6:18:38 AM: > node -e "try{require('./postinstall')}catch(e){}"
6:18:38 AM: > ejs@2.7.4 postinstall /opt/build/repo/app/node_modules/ejs
6:18:38 AM: > node ./postinstall.js
6:18:40 AM: npm notice created a lockfile as package-lock.json. You should commit this file.
6:18:40 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.1.3 (node_modules/react-scripts/node_modules/fsevents):
6:18:40 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
6:18:40 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
6:18:40 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
6:18:40 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
6:18:40 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
6:18:40 AM: npm WARN @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.14.5 requires a peer of @babel/core@^7.13.0 but none is installed. You must install peer dependencies yourself.
6:18:40 AM: npm WARN tsutils@3.21.0 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
6:18:40 AM: added 1818 packages from 736 contributors and audited 1821 packages in 46.908s
6:18:41 AM: 145 packages are looking for funding
6:18:41 AM:   run `npm fund` for details
6:18:41 AM: found 8 vulnerabilities (4 moderate, 4 high)
6:18:41 AM:   run `npm audit fix` to fix them, or `npm audit` for details
6:18:41 AM: NPM modules installed
6:18:42 AM: Started restoring cached go cache
6:18:42 AM: Finished restoring cached go cache
6:18:42 AM: go version go1.14.4 linux/amd64
6:18:42 AM: go version go1.14.4 linux/amd64
6:18:42 AM: Installing missing commands
6:18:42 AM: Verify run directory
6:18:42 AM: ​
6:18:42 AM: ────────────────────────────────────────────────────────────────
6:18:42 AM:   Netlify Build                                                 
6:18:42 AM: ────────────────────────────────────────────────────────────────
6:18:42 AM: ​
6:18:42 AM: ❯ Version
6:18:42 AM:   @netlify/build 12.4.0
6:18:42 AM: ​
6:18:42 AM: ❯ Flags
6:18:42 AM:   deployId: 60d02f084a5f7d00073675a9
6:18:42 AM: ​
6:18:42 AM: ❯ Current directory
6:18:42 AM:   /opt/build/repo/app
6:18:42 AM: ​
6:18:42 AM: ❯ Config file
6:18:42 AM:   No config file was defined: using default values.
6:18:42 AM: ​
6:18:42 AM: ❯ Context
6:18:42 AM:   production
6:18:42 AM: ​
6:18:42 AM: ────────────────────────────────────────────────────────────────
6:18:42 AM:   1. Build command from Netlify app                             
6:18:42 AM: ────────────────────────────────────────────────────────────────
6:18:42 AM: ​
6:18:42 AM: $ yarn build
6:18:42 AM: bash: yarn: command not found
6:18:42 AM: ​
6:18:42 AM: ────────────────────────────────────────────────────────────────
6:18:42 AM:   "build.command" failed                                        
6:18:42 AM: ────────────────────────────────────────────────────────────────
6:18:42 AM: ​
6:18:42 AM:   Error message
6:18:42 AM:   Command failed with exit code 127: yarn build
6:18:42 AM: ​
6:18:42 AM:   Error location
6:18:42 AM:   In Build command from Netlify app:
6:18:42 AM:   yarn build
6:18:42 AM: ​
6:18:42 AM:   Resolved config
6:18:42 AM:   build:
6:18:42 AM:     base: /opt/build/repo/app
6:18:42 AM:     command: yarn build
6:18:42 AM:     commandOrigin: ui
6:18:42 AM:     publish: /opt/build/repo/app
6:18:42 AM:   functions:
6:18:42 AM:     '*': {}
6:18:43 AM: Caching artifacts
6:18:43 AM: Started saving node modules
6:18:43 AM: Finished saving node modules
6:18:43 AM: Started saving build plugins
6:18:43 AM: Finished saving build plugins
6:18:43 AM: Started saving pip cache
6:18:43 AM: Finished saving pip cache
6:18:43 AM: Started saving emacs cask dependencies
6:18:43 AM: Finished saving emacs cask dependencies
6:18:43 AM: Started saving maven dependencies
6:18:43 AM: Finished saving maven dependencies
6:18:43 AM: Started saving boot dependencies
6:18:43 AM: Finished saving boot dependencies
6:18:43 AM: Started saving rust rustup cache
6:18:43 AM: Finished saving rust rustup cache
6:18:43 AM: Started saving go dependencies
6:18:43 AM: Finished saving go dependencies
6:18:45 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:18:45 AM: Creating deploy upload records
6:18:45 AM: Failing build: Failed to build site
6:18:45 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2
6:18:45 AM: Finished processing build request in 59.111772178s

This is my build settings
Base directory: /app/ (I have tried with app/ as well)
Publish: N/A
Build Command: yarn build

Locally, I can build my app just fine.

I confirm that my file structure is wildthorns/app (app is where the CRA lives)

I have tried with a netlify.toml file as well using

[build]
  # Directory that contains the deploy-ready HTML files and assets generated by
  # the build. This is relative to the base directory if one has been set, or the
  # root directory if a base has not been set. This sample publishes the
  # directory located at the absolute path "root/project/build-output"
  publish = "build/"
  base = "/app/"

Gave me different issues and errors.

I have also tried setting my publish director to /app/build as well with the same errors noted in the above deploy logs

Can anyone advise?

Hi @rob84044,

Do you have a yarn.lock file in your repo (as was the solution for the post :arrow_down: )?

1 Like