New site fails to deploy

6:14:55 PM: build-image version: d7b3813f01c06610bc1723ff1b22446513ee7941 (focal)
6:14:55 PM: build-image tag: v4.14.3
6:14:55 PM: buildbot version: 4bbbb4f3037b3dc1dcca89f1a4b61b3a106a845b
6:14:55 PM: Building without cache
6:14:55 PM: Starting to prepare the repo for build
6:14:56 PM: No cached dependencies found. Cloning fresh repo
6:14:56 PM: git clone GitHub - jcedwards48/dictionary-last
6:14:56 PM: Preparing Git Reference refs/heads/main
6:14:56 PM: Parsing package.json dependencies
6:14:57 PM: Section completed: initializing
6:14:57 PM: Starting build script
6:14:57 PM: Installing dependencies
6:14:57 PM: Python version set to 2.7
6:14:58 PM: Downloading and installing node v16.18.1…
6:14:58 PM: Downloading https://nodejs.org/dist/v16.18.1/node-v16.18.1-linux-x64.tar.xz…
6:14:58 PM: Computing checksum with sha256sum
6:14:58 PM: Checksums matched!
6:15:00 PM: Now using node v16.18.1 (npm v8.19.2)
6:15:00 PM: Enabling node corepack
6:15:01 PM: Started restoring cached build plugins
6:15:01 PM: Finished restoring cached build plugins
6:15:01 PM: Attempting ruby version 2.7.2, read from environment
6:15:01 PM: Using ruby version 2.7.2
6:15:01 PM: Using PHP version 8.0
6:15:01 PM: Started restoring cached go cache
6:15:01 PM: Finished restoring cached go cache
6:15:01 PM: Installing Go version 1.17 (requested 1.17)
6:15:06 PM: unset GOOS;
6:15:06 PM: unset GOARCH;
6:15:06 PM: export GOROOT=β€˜/opt/buildhome/.gimme/versions/go1.17.linux.amd64’;
6:15:06 PM: export PATH=β€œ/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}”;
6:15:06 PM: go version >&2;
6:15:06 PM: export GIMME_ENV=β€œ/opt/buildhome/.gimme/env/go1.17.linux.amd64.env”
6:15:06 PM: go version go1.17 linux/amd64
6:15:06 PM: Detected 0 framework(s)
6:15:06 PM: Installing missing commands
6:15:06 PM: Verify run directory
6:15:08 PM: ​
6:15:08 PM: ────────────────────────────────────────────────────────────────
6:15:08 PM: Netlify Build
6:15:08 PM: ────────────────────────────────────────────────────────────────
6:15:08 PM: ​
6:15:08 PM: ❯ Version
6:15:08 PM: @netlify/build 28.1.13
6:15:08 PM: ​
6:15:08 PM: ❯ Flags
6:15:08 PM: baseRelDir: true
6:15:08 PM: buildId: 63756eedd03fb96baf1f66f9
6:15:08 PM: deployId: 63756eedd03fb96baf1f66fb
6:15:08 PM: ​
6:15:08 PM: ❯ Current directory
6:15:08 PM: /opt/build/repo
6:15:08 PM: ​
6:15:08 PM: ❯ Config file
6:15:08 PM: No config file was defined: using default values.
6:15:08 PM: ​
6:15:08 PM: ❯ Context
6:15:08 PM: production
6:15:08 PM: ​
6:15:08 PM: ────────────────────────────────────────────────────────────────
6:15:08 PM: 1. Build command from Netlify app
6:15:08 PM: ────────────────────────────────────────────────────────────────
6:15:08 PM: ​
6:15:08 PM: $ CI= npm run build
6:15:08 PM: npm ERR! code ENOENT
6:15:08 PM: npm ERR! syscall open
6:15:08 PM: npm ERR! path /opt/build/repo/package.json
6:15:08 PM: npm ERR! errno -2
6:15:08 PM: npm ERR! enoent ENOENT: no such file or directory, open β€˜/opt/build/repo/package.json’
6:15:08 PM: npm ERR! enoent This is related to npm not being able to find a file.
6:15:08 PM: npm ERR! enoent
6:15:08 PM: npm ERR! A complete log of this run can be found in:
6:15:08 PM: npm ERR! /opt/buildhome/.npm/_logs/2022-11-16T23_15_08_292Z-debug-0.log
6:15:08 PM: ​
6:15:09 PM: Creating deploy upload records
6:15:08 PM: ────────────────────────────────────────────────────────────────
6:15:08 PM: β€œbuild.command” failed
6:15:08 PM: ────────────────────────────────────────────────────────────────
6:15:10 PM: Failed during stage β€˜building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
6:15:08 PM: ​
6:15:08 PM: Error message
6:15:08 PM: Command failed with exit code 254: CI= npm run build (Search results for '"non-zero exit code: 254"' - Netlify Support Forums)
6:15:08 PM: ​
6:15:08 PM: Error location
6:15:08 PM: In Build command from Netlify app:
6:15:08 PM: CI= npm run build
6:15:08 PM: ​
6:15:08 PM: Resolved config
6:15:08 PM: build:
6:15:08 PM: command: CI= npm run build
6:15:08 PM: commandOrigin: ui
6:15:08 PM: environment:
6:15:08 PM: - CI
6:15:08 PM: publish: /opt/build/repo/build
6:15:08 PM: publishOrigin: ui
6:15:08 PM: Caching artifacts
6:15:08 PM: Started saving build plugins
6:15:08 PM: Finished saving build plugins
6:15:08 PM: Started saving pip cache
6:15:08 PM: Finished saving pip cache
6:15:08 PM: Started saving emacs cask dependencies
6:15:08 PM: Finished saving emacs cask dependencies
6:15:08 PM: Started saving maven dependencies
6:15:08 PM: Finished saving maven dependencies
6:15:08 PM: Started saving boot dependencies
6:15:08 PM: Finished saving boot dependencies
6:15:08 PM: Started saving rust rustup cache
6:15:08 PM: Finished saving rust rustup cache
6:15:08 PM: Started saving go dependencies
6:15:08 PM: Finished saving go dependencies
6:15:09 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:15:10 PM: Failing build: Failed to build site
6:15:10 PM: Finished processing build request in 14.63123423s

Hi @jcedwards48, based on your build log, you are trying to deploy dictionary-last from your GitHub.
Note that the dictionary-last folder contains only the file .gitattributes. Hence the reason for your site failing to deploy since the folder contains no files that can be served by Netlify.

Kindly check if dictionary-last is the actual folder you want to deploy. If dictionary-last is the folder you want to deploy then check if you are correctly pushing changes from your local development to dictionary-last.

Let me know the outcome.

Thanks.

1 Like