"build.command" failed

IDK how to deal with this problem. Here is my deploy log

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

Hey @zaqwsxssaaaaa

The issue is there is no package.json in the root of the repository

This is because the code for the NFT app is in the mint subdirectory. You need to set the base directory as explained here (see documentation here.)

hey there, while we’re talking I wanted to let you know ]that we ask all businesses in the NFT/Crypto space to speak with our sales and solutions team to purchase a contract to ensure that your site is on an appropriate account level for your usage.

You can reach them here:

Our High Performance Edge product is usually a necessity to be able to handle and administer successful launches.

We have seen many customers who have sites like these get attacked, and on our lower plans, such as Starter and Pro, these attacks tend to harm our main network. If that happens, we may not be able to keep your site online. Should an attack on your site harm our network or jeopardize the uptime of other customers, we will opt to take down your site. Further, many NFT/Crypto sites have generated bills for thousands of dollars worth of bandwidth used during launch, Please make sure you are prepared to pay for eventual bandwidth charges which have been several thousands of dollars in the past. Please be advised that we are prepared to take all possible steps to ensure we are compensated should that happen here too.

If the above info changes whether or not you would like to proceed with hosting on Netlify, we encourage you to make the decision that is best for you, which might mean moving to a different provider, if the above seems unreasonable to you.