Failed to fetch cache, continuing with build

PLEASE help us help you by writing a good post!

I keep getting failed while trying to publish, the build forms do not auto populate so I manually fill them:
“npm run build” and then I last one I use “build” am I doing something wrong?

7:15:43 PM: Build ready to start
7:15:49 PM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
7:15:49 PM: build-image tag: v4.10.1
7:15:49 PM: buildbot version: fe6512288e75c8fa5aadaebb51ed1f96e9314fd4
7:15:49 PM: Fetching cached dependencies
7:15:49 PM: Failed to fetch cache, continuing with build
7:15:49 PM: Starting to prepare the repo for build
7:15:49 PM: No cached dependencies found. Cloning fresh repo
7:15:49 PM: git clone GitHub - arshmohd/my-second-project
7:15:50 PM: Preparing Git Reference refs/heads/master
7:15:50 PM: Parsing package.json dependencies
7:15:50 PM: Starting build script
7:15:50 PM: Installing dependencies
7:15:50 PM: Python version set to 2.7
7:15:51 PM: v16.16.0 is already installed.
7:15:51 PM: Now using node v16.16.0 (npm v8.11.0)
7:15:51 PM: Started restoring cached build plugins
7:15:51 PM: Finished restoring cached build plugins
7:15:51 PM: Attempting ruby version 2.7.2, read from environment
7:15:52 PM: Using ruby version 2.7.2
7:15:52 PM: Using PHP version 8.0
7:15:52 PM: Started restoring cached go cache
7:15:52 PM: Finished restoring cached go cache
7:15:52 PM: Installing Go version 1.17 (requested 1.17)
7:15:56 PM: unset GOOS;
7:15:56 PM: unset GOARCH;
7:15:56 PM: export GOROOT=‘/opt/buildhome/.gimme/versions/go1.17.linux.amd64’;
7:15:56 PM: export PATH=“/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}”;
7:15:56 PM: go version >&2;
7:15:56 PM: export GIMME_ENV=“/opt/buildhome/.gimme/env/go1.17.linux.amd64.env”
7:15:56 PM: go version go1.17 linux/amd64
7:15:56 PM: Installing missing commands
7:15:56 PM: Verify run directory
7:15:57 PM: ​
7:15:57 PM: ────────────────────────────────────────────────────────────────
7:15:57 PM: Netlify Build
7:15:57 PM: ────────────────────────────────────────────────────────────────
7:15:57 PM: ​
7:15:57 PM: ❯ Version
7:15:57 PM: @netlify/build 27.9.1
7:15:57 PM: ​
7:15:57 PM: ❯ Flags
7:15:57 PM: baseRelDir: true
7:15:57 PM: buildId: 62ee708713baf850ff59fc9a
7:15:57 PM: deployId: 62ee708713baf850ff59fc9c
7:15:57 PM: systemLogFile: 3
7:15:57 PM: ​
7:15:57 PM: ❯ Current directory
7:15:57 PM: /opt/build/repo
7:15:57 PM: ​
7:15:57 PM: ❯ Config file
7:15:57 PM: No config file was defined: using default values.
7:15:57 PM: ​
7:15:57 PM: ❯ Context
7:15:57 PM: production
7:15:57 PM: ​
7:15:57 PM: ────────────────────────────────────────────────────────────────
7:15:57 PM: 1. Build command from Netlify app
7:15:57 PM: ────────────────────────────────────────────────────────────────
7:15:57 PM: ​
7:15:57 PM: $ npm run build
7:15:57 PM: npm ERR! code ENOENT
7:15:57 PM: npm ERR! syscall open
7:15:57 PM: npm ERR! path /opt/build/repo/package.json
7:15:57 PM: npm ERR! errno -2
7:15:57 PM: npm ERR! enoent ENOENT: no such file or directory, open ‘/opt/build/repo/package.json’
7:15:57 PM: npm ERR! enoent This is related to npm not being able to find a file.
7:15:57 PM: npm ERR! enoent
7:15:57 PM: npm ERR! A complete log of this run can be found in:
7:15:57 PM: npm ERR! /opt/buildhome/.npm/_logs/2022-08-06T13_45_57_632Z-debug-0.log
7:15:57 PM: ​
7:15:57 PM: ────────────────────────────────────────────────────────────────
7:15:57 PM: “build.command” failed
7:15:57 PM: ────────────────────────────────────────────────────────────────
7:15:57 PM: ​
7:15:57 PM: Error message
7:15:57 PM: Command failed with exit code 254: npm run build (Search results for '"non-zero exit code: 254"' - Netlify Support Forums)
7:15:57 PM: ​
7:15:57 PM: Error location
7:15:57 PM: In Build command from Netlify app:
7:15:57 PM: npm run build
7:15:57 PM: ​
7:15:57 PM: Resolved config
7:15:57 PM: build:
7:15:57 PM: command: npm run build
7:15:57 PM: commandOrigin: ui
7:15:57 PM: publish: /opt/build/repo/build
7:15:57 PM: publishOrigin: ui
7:15:58 PM: Caching artifacts
7:15:58 PM: Started saving build plugins
7:15:58 PM: Finished saving build plugins
7:15:58 PM: Started saving pip cache
7:15:58 PM: Finished saving pip cache
7:15:58 PM: Started saving emacs cask dependencies
7:15:58 PM: Finished saving emacs cask dependencies
7:15:58 PM: Started saving maven dependencies
7:15:58 PM: Finished saving maven dependencies
7:15:58 PM: Started saving boot dependencies
7:15:58 PM: Finished saving boot dependencies
7:15:58 PM: Started saving rust rustup cache
7:15:58 PM: Finished saving rust rustup cache
7:15:58 PM: Started saving go dependencies
7:15:58 PM: Finished saving go dependencies
7:15:58 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
7:15:58 PM: Creating deploy upload records
7:15:58 PM: Failing build: Failed to build site
7:15:58 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)
7:15:59 PM: Finished processing build request in 9.648773008s

Your repo: GitHub - arshmohd/my-second-project doesn’t have a package.json (or any files except readme for that matter).