Netlify deploy errors

HELPPPP… Please check Lines 107-113 . This is a gatsby site so everything is triggered thru the config.js file but for some reason Netlify can not find that file? No idea why this is happening. Pls see deploy log below:

5:00:56 PM: Build ready to start
5:00:58 PM: build-image version: 3571f0130496395a23bffe9820bc78b4f73a6234
5:00:58 PM: build-image tag: v3.7.0
5:00:58 PM: buildbot version: 35681551598b95548b996201c978361e7ed9f7e7
5:00:58 PM: Fetching cached dependencies
5:00:59 PM: Starting to download cache of 152.2MB
5:00:59 PM: Finished downloading cache in 952.085335ms
5:00:59 PM: Starting to extract cache
5:01:06 PM: Finished extracting cache in 6.592716326s
5:01:06 PM: Finished fetching cache in 7.625801123s
5:01:06 PM: Starting to prepare the repo for build
5:01:06 PM: Preparing Git Reference refs/heads/master
5:01:08 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: β€˜bkpalm/config.js’ versus β€˜config.js’ in the Netlify UI
5:01:08 PM: Starting build script
5:01:08 PM: Installing dependencies
5:01:08 PM: Python version set to 2.7
5:01:09 PM: Started restoring cached node version
5:01:12 PM: Finished restoring cached node version
5:01:13 PM: v12.18.0 is already installed.
5:01:13 PM: Now using node v12.18.0 (npm v6.14.4)
5:01:13 PM: Started restoring cached build plugins
5:01:13 PM: Finished restoring cached build plugins
5:01:13 PM: Attempting ruby version 2.7.1, read from environment
5:01:15 PM: Using ruby version 2.7.1
5:01:15 PM: Using PHP version 5.6
5:01:15 PM: Started restoring cached node modules
5:01:15 PM: Finished restoring cached node modules
5:01:16 PM: Started restoring cached go cache
5:01:16 PM: Finished restoring cached go cache
5:01:16 PM: go version go1.14.4 linux/amd64
5:01:16 PM: go version go1.14.4 linux/amd64
5:01:16 PM: Installing missing commands
5:01:16 PM: Verify run directory
5:01:18 PM: ​
5:01:18 PM: ────────────────────────────────────────────────────────────────
5:01:18 PM: Netlify Build
5:01:18 PM: ────────────────────────────────────────────────────────────────
5:01:18 PM: ​
5:01:18 PM: ❯ Version
5:01:18 PM: @netlify/build 9.10.2
5:01:18 PM: ​
5:01:18 PM: ❯ Flags
5:01:18 PM: apiHost: api.netlify.com
5:01:18 PM: cacheDir: /opt/build/cache
5:01:18 PM: deployId: 60526e08ac9dba4157ccff96
5:01:18 PM: mode: buildbot
5:01:18 PM: testOpts:
5:01:18 PM: silentLingeringProcesses: β€˜β€™
5:01:18 PM: ​
5:01:18 PM: ❯ Current directory
5:01:18 PM: /opt/build/repo/bkpalm
5:01:18 PM: ​
5:01:18 PM: ❯ Config file
5:01:18 PM: No config file was defined: using default values.
5:01:18 PM: ​
5:01:18 PM: ❯ Context
5:01:18 PM: production
5:01:18 PM: ​
5:01:18 PM: ────────────────────────────────────────────────────────────────
5:01:18 PM: 1. Build command from Netlify app
5:01:18 PM: ────────────────────────────────────────────────────────────────
5:01:18 PM: ​
5:01:18 PM: $ gatsby build
5:01:21 PM: success open and validate gatsby-configs - 0.046s
5:01:22 PM: success load plugins - 0.522s
5:01:22 PM: success onPreInit - 0.028s
5:01:22 PM: success delete html and css files from previous builds - 0.004s
5:01:22 PM: success initialize cache - 0.007s
5:01:22 PM: success copy gatsby files - 0.057s
5:01:22 PM: success onPreBootstrap - 0.019s
5:01:22 PM: success createSchemaCustomization - 0.001s
5:01:22 PM: success Checking for changed pages - 0.000s
5:01:22 PM: success source and transform nodes - 0.050s
5:01:22 PM: success building schema - 0.307s
5:01:22 PM: info Total nodes: 27, SitePage nodes: 2 (use --verbose for breakdown)
5:01:22 PM: success createPages - 0.020s
5:01:22 PM: success Checking for changed pages - 0.000s
5:01:22 PM: success createPagesStatefully - 0.064s
5:01:23 PM: success update schema - 0.042s
5:01:23 PM: success onPreExtractQueries - 0.000s
5:01:23 PM: success extract queries from components - 0.099s
5:01:23 PM: success write out redirect data - 0.001s
5:01:23 PM: success Build manifest and related icons - 0.327s
5:01:23 PM: success onPostBootstrap - 0.330s
5:01:23 PM: info bootstrap finished - 5.155s
5:01:23 PM: success run static queries - 0.014s - 1/1 70.44/s
5:01:23 PM: success run page queries - 0.006s - 5/5 826.04/s
5:01:23 PM: success write out requires - 0.004s
5:01:41 PM: success Building production JavaScript and CSS bundles - 18.188s
5:01:41 PM: success Rewriting compilation hashes - 0.002s
5:01:45 PM: success Building HTML renderer - 3.169s
5:01:45 PM: success Building static HTML for pages - 0.217s - 5/5 23.06/s
5:01:45 PM: info Generated public/sw.js, which will precache 7 files, totaling 274485 bytes.
5:01:45 PM: The following pages will be precached:
5:01:45 PM: /offline-plugin-app-shell-fallback/index.html
5:01:45 PM: success onPostBuild - 0.079s
5:01:45 PM: info Done building in 27.066308586 sec
5:01:45 PM: ​
5:01:45 PM: (build.command completed in 27.4s)
5:01:45 PM: ​
5:01:45 PM: ────────────────────────────────────────────────────────────────
5:01:45 PM: 2. Deploy site
5:01:45 PM: ────────────────────────────────────────────────────────────────
5:01:45 PM: ​
5:01:45 PM: ​
5:01:45 PM: ────────────────────────────────────────────────────────────────
5:01:45 PM: Configuration error
5:01:45 PM: ────────────────────────────────────────────────────────────────
5:01:45 PM: ​
5:01:45 PM: Error message
5:01:45 PM: Deploy did not succeed: Deploy directory β€˜bkpalm/config.js’ is not a directory
5:01:45 PM: ​
5:01:45 PM: Resolved config
5:01:45 PM: build:
5:01:45 PM: base: /opt/build/repo/bkpalm
5:01:45 PM: command: gatsby build
5:01:45 PM: commandOrigin: ui
5:01:45 PM: publish: /opt/build/repo/bkpalm/config.js
5:01:45 PM: Caching artifacts
5:01:45 PM: Started saving node modules
5:01:45 PM: Finished saving node modules
5:01:45 PM: Started saving build plugins
5:01:45 PM: Finished saving build plugins
5:01:45 PM: Started saving pip cache
5:01:45 PM: Finished saving pip cache
5:01:45 PM: Started saving emacs cask dependencies
5:01:46 PM: Finished saving emacs cask dependencies
5:01:46 PM: Started saving maven dependencies
5:01:46 PM: Finished saving maven dependencies
5:01:46 PM: Started saving boot dependencies
5:01:46 PM: Finished saving boot dependencies
5:01:46 PM: Started saving rust rustup cache
5:01:46 PM: Finished saving rust rustup cache
5:01:46 PM: Started saving go dependencies
5:01:46 PM: Finished saving go dependencies
5:01:46 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
5:01:46 PM: Failing build: Failed to build site
5:01:46 PM: Failed during stage β€˜building site’: Build script returned non-zero exit code: 2
5:01:46 PM: Finished processing build request in 47.446257918s

I think it’s quite obvious. The build log never said it can’t find the file, it says, it’s not a directory.

For some reason, you’re using config.js as your publish path, while it should be public.

That was a bit of a spicy response but nonetheless helpful as it fixed my issue (still, tip of the hat to you Sir–THANKS FOR THE FIX).

But let me prettify your response so that your technical responses come across a little less biting.

Instead of: β€œI think it’s quite obvious”
Try: β€œYou may have missed this in our docs (helpful link)… Or perhaps you should try (helpful link)” :mechanical_arm:

Instead of: β€œThe build log never said it can’t find the file, it says, it’s not a directory.”
Try: β€œTo be clear, the build log didn’t mention a missing file but a DIRECTORY. This distinction is important to remember as the scripts aren’t looking for a file but rather a directory , which in your case should be the /public folder, in the build” :mechanical_arm:

Some comity and kindness to your fellow human always go a long way toward improving technical communication and removes unnecessary layers of perceived bias and enmity toward the person you’re trying to help which is clearly not the goal which should be, to quote the philosopher-king Borat, β€œvery niiiice” to every human on these discussion boards.

It may be a hack(neyed) expression but remember, β€œI don’t care what you know until I know that you care”.

THANKS–R

Sure, that’s fair. Thanks for making the forums better for everyone.

1 Like

@hrishikesh @webdevs4ever Thank you both for working through that valuable feedback and getting to the bottom of the issue! We appreciate you both. :netliconfetti:

Appreciate it team. TYVM @hrishikesh @hillary.

1 Like