Build run command issues

2:23:06 PM: Build ready to start
2:23:08 PM: build-image version: 195fbe127e5c374d9c4758652cb62e3b8936a395 (focal)
2:23:08 PM: build-image tag: v4.6.0
2:23:08 PM: buildbot version: 43c70c62bfed821cfaaabbb50f00238dd4bdd2d6
2:23:08 PM: Fetching cached dependencies
2:23:08 PM: Failed to fetch cache, continuing with build
2:23:08 PM: Starting to prepare the repo for build
2:23:08 PM: No cached dependencies found. Cloning fresh repo
2:23:08 PM: git clone GitHub - jaredjinks/Tigxels
2:23:09 PM: Preparing Git Reference refs/heads/main
2:23:09 PM: Parsing package.json dependencies
2:23:10 PM: Different build dir detected, going to use the one specified in the Netlify configuration file: β€˜β€™ versus β€˜/’ in the Netlify UI
2:23:10 PM: Starting build script
2:23:10 PM: Installing dependencies
2:23:10 PM: Python version set to 2.7
2:23:11 PM: Downloading and installing node v16.14.2…
2:23:11 PM: Downloading https://nodejs.org/dist/v16.14.2/node-v16.14.2-linux-x64.tar.xz…
2:23:11 PM: Computing checksum with sha256sum
2:23:11 PM: Checksums matched!
2:23:14 PM: Now using node v16.14.2 (npm v8.5.0)
2:23:14 PM: Started restoring cached build plugins
2:23:14 PM: Finished restoring cached build plugins
2:23:14 PM: Attempting ruby version 2.7.2, read from environment
2:23:15 PM: Using ruby version 2.7.2
2:23:15 PM: Using PHP version 8.0
2:23:15 PM: Started restoring cached go cache
2:23:15 PM: Finished restoring cached go cache
2:23:15 PM: go version go1.16.5 linux/amd64
2:23:15 PM: go version go1.16.5 linux/amd64
2:23:15 PM: Installing missing commands
2:23:15 PM: Verify run directory
2:23:16 PM: ​
2:23:16 PM: ────────────────────────────────────────────────────────────────
2:23:16 PM: Netlify Build
2:23:16 PM: ────────────────────────────────────────────────────────────────
2:23:16 PM: ​
2:23:16 PM: ❯ Version
2:23:16 PM: @netlify/build 26.5.1
2:23:16 PM: ​
2:23:16 PM: ❯ Flags
2:23:16 PM: baseRelDir: true
2:23:16 PM: buildId: 6242273afa076d0d90b6d141
2:23:16 PM: deployId: 6242273afa076d0d90b6d143
2:23:16 PM: ​
2:23:16 PM: ❯ Current directory
2:23:16 PM: /opt/build/repo
2:23:16 PM: ​
2:23:16 PM: ❯ Config file
2:23:16 PM: No config file was defined: using default values.
2:23:16 PM: ​
2:23:16 PM: ❯ Context
2:23:16 PM: production
2:23:16 PM: ​
2:23:16 PM: ────────────────────────────────────────────────────────────────
2:23:16 PM: 1. Build command from Netlify app
2:23:16 PM: ────────────────────────────────────────────────────────────────
2:23:16 PM: ​
2:23:16 PM: $ npm run build
2:23:17 PM: npm ERR! code ENOENT
2:23:17 PM: npm ERR! syscall open
2:23:17 PM: npm ERR! path /opt/build/repo/package.json
2:23:17 PM: npm ERR! errno -2
2:23:17 PM: npm ERR! enoent ENOENT: no such file or directory, open β€˜/opt/build/repo/package.json’
2:23:17 PM: npm ERR! enoent This is related to npm not being able to find a file.
2:23:17 PM: npm ERR! enoent
2:23:17 PM: npm ERR! A complete log of this run can be found in:
2:23:17 PM: npm ERR! /opt/buildhome/.npm/_logs/2022-03-28T21_23_17_110Z-debug-0.log
2:23:17 PM: ​
2:23:17 PM: ────────────────────────────────────────────────────────────────
2:23:17 PM: β€œbuild.command” failed
2:23:17 PM: ────────────────────────────────────────────────────────────────
2:23:17 PM: ​
2:23:17 PM: Error message
2:23:17 PM: Command failed with exit code 254: npm run build (Search results for '"non-zero exit code: 254"' - Netlify Support Forums)
2:23:17 PM: ​
2:23:17 PM: Error location
2:23:17 PM: In Build command from Netlify app:
2:23:17 PM: npm run build
2:23:17 PM: ​
2:23:17 PM: Resolved config
2:23:17 PM: build:
2:23:17 PM: base: /opt/build/repo
2:23:17 PM: command: npm run build
2:23:17 PM: commandOrigin: ui
2:23:17 PM: publish: /opt/build/repo/build
2:23:17 PM: publishOrigin: ui
2:23:17 PM: Caching artifacts
2:23:17 PM: Started saving build plugins
2:23:17 PM: Finished saving build plugins
2:23:19 PM: Creating deploy upload records
2:23:17 PM: Started saving pip cache
2:23:17 PM: Finished saving pip cache
2:23:17 PM: Started saving emacs cask dependencies
2:23:17 PM: Finished saving emacs cask dependencies
2:23:19 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)
2:23:17 PM: Started saving maven dependencies
2:23:17 PM: Finished saving maven dependencies
2:23:17 PM: Started saving boot dependencies
2:23:17 PM: Finished saving boot dependencies
2:23:17 PM: Started saving rust rustup cache
2:23:17 PM: Finished saving rust rustup cache
2:23:17 PM: Started saving go dependencies
2:23:17 PM: Finished saving go dependencies
2:23:19 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:23:19 PM: Failing build: Failed to build site
2:23:19 PM: Finished processing build request in 11.336913112s

Hey @jaredjinks and welcome to the forums.

Have you read the this comprehensive support guide?

I also see you are deploying the Stripes NFT app. There are a number of threads for this particular repository which you can find by searching nft-minting-app-main in these forums.

Also have a read through the following post regard NFT/Crypto apps on Netlify by @perry.

1 Like