Unknown: Could not find entry: /opt/build/repo/ "build.command" failed

PLEASE help us help you by writing a good post!

Hello, I’m new to coding, and trying to deploy my first project that i used parcel with JS, CSS, and HTML to make. I’ve tried troubleshooting exactly what is wrong but cant seem to have any luck. Here is the error I’m getting below.

Deploy failed for golden-kringle-59f43c

error:
11:38:21 PM: build-image version: cd0a67ec27b8bcd87e2a257fe5ebcf1900a8021d (focal)
11:38:21 PM: buildbot version: cd0a67ec27b8bcd87e2a257fe5ebcf1900a8021d
11:38:22 PM: Building without cache
11:38:22 PM: Starting to prepare the repo for build
11:38:22 PM: No cached dependencies found. Cloning fresh repo
11:38:22 PM: git clone --filter=blob:none GitHub - jonp001/planeShoot
11:38:22 PM: Preparing Git Reference refs/heads/master
11:38:22 PM: Parsing package.json dependencies
11:38:24 PM: Starting to install dependencies
11:38:24 PM: Python version set to 3.8
11:38:24 PM: Attempting Ruby version 2.7.2, read from environment
11:38:25 PM: Using Ruby version 2.7.2
11:38:25 PM: Started restoring cached go cache
11:38:25 PM: Finished restoring cached go cache
11:38:25 PM: Installing Go version 1.19.5 (requested 1.19.5)
11:38:30 PM: go version go1.19.5 linux/amd64
11:38:30 PM: Using PHP version 8.0
11:38:31 PM: v16.20.0 is already installed.
11:38:32 PM: Now using node v16.20.0 (npm v8.19.4)
11:38:32 PM: Enabling Node.js Corepack
11:38:32 PM: Started restoring cached build plugins
11:38:32 PM: Finished restoring cached build plugins
11:38:32 PM: Started restoring cached corepack dependencies
11:38:32 PM: Finished restoring cached corepack dependencies
11:38:32 PM: No npm workspaces detected
11:38:32 PM: Started restoring cached node modules
11:38:32 PM: Finished restoring cached node modules
11:38:32 PM: Installing npm packages using npm version 8.19.4
11:38:33 PM: npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: Array.prototype.sort() - JavaScript | MDN
11:38:36 PM: added 195 packages, and audited 196 packages in 3s
11:38:36 PM: 82 packages are looking for funding
11:38:36 PM: run npm fund for details
11:38:36 PM: found 0 vulnerabilities
11:38:36 PM: npm packages installed
11:38:36 PM: Install dependencies script success
11:38:36 PM: Starting build script
11:38:37 PM: Detected 1 framework(s)
11:38:37 PM: “parcel” at version “2.8.3”
11:38:37 PM: Section completed: initializing
11:38:38 PM: ​
11:38:38 PM: Netlify Build
11:38:38 PM: ────────────────────────────────────────────────────────────────
11:38:38 PM: ​
11:38:38 PM: ❯ Version
11:38:38 PM: @netlify/build 29.10.1
11:38:38 PM: ​
11:38:38 PM: ❯ Flags
11:38:38 PM: baseRelDir: true
11:38:38 PM: buildId: 64547a13312e514d4024f1cb
11:38:38 PM: deployId: 64547a13312e514d4024f1cd
11:38:38 PM: ​
11:38:38 PM: ❯ Current directory
11:38:38 PM: /opt/build/repo
11:38:38 PM: ​
11:38:38 PM: ❯ Config file
11:38:38 PM: No config file was defined: using default values.
11:38:38 PM: ​
11:38:38 PM: ❯ Context
11:38:38 PM: production
11:38:38 PM: ​
11:38:38 PM: 1. Build command from Netlify app
11:38:38 PM: ────────────────────────────────────────────────────────────────
11:38:38 PM: ​
11:38:38 PM: $ parcel build
11:38:38 PM: :rotating_light: Build failed.
11:38:38 PM: unknown: Could not find entry: /opt/build/repo/
11:38:39 PM: ​
11:38:39 PM: “build.command” failed
11:38:39 PM: ────────────────────────────────────────────────────────────────
11:38:39 PM: ​
11:38:39 PM: Error message
11:38:39 PM: Command failed with exit code 1: parcel build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
11:38:39 PM: ​
11:38:39 PM: Error location
11:38:39 PM: In Build command from Netlify app:
11:38:39 PM: parcel build
11:38:39 PM: ​
11:38:39 PM: Resolved config
11:38:39 PM: build:
11:38:39 PM: command: parcel build
11:38:39 PM: commandOrigin: ui
11:38:39 PM: publish: /opt/build/repo
11:38:39 PM: publishOrigin: default
11:38:40 PM: Caching artifacts
11:38:40 PM: Started saving node modules
11:38:40 PM: Finished saving node modules
11:38:40 PM: Started saving build plugins
11:38:40 PM: Finished saving build plugins
11:38:40 PM: Started saving corepack cache
11:38:40 PM: Finished saving corepack cache
11:38:40 PM: Started saving pip cache
11:38:40 PM: Finished saving pip cache
11:38:40 PM: Started saving emacs cask dependencies
11:38:40 PM: Finished saving emacs cask dependencies
11:38:40 PM: Started saving maven dependencies
11:38:40 PM: Finished saving maven dependencies
11:38:40 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)
11:38:40 PM: Started saving boot dependencies
11:38:40 PM: Finished saving boot dependencies
11:38:40 PM: Started saving rust rustup cache
11:38:40 PM: Finished saving rust rustup cache
11:38:40 PM: Started saving go dependencies
11:38:40 PM: Finished saving go dependencies
11:38:40 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:38:40 PM: Failing build: Failed to build site
11:38:41 PM: Finished processing build request in 19.422s

please let me know what else I can provide. thank you in advance :slight_smile:

my JSON Package file

To quote the Parcel documentation

Parcel’s production mode automatically bundles and optimizes your application for production. It can be run using the parcel build command:

parcel build src/index.html

The build command you’re using doesn’t specify what parcel is to build.

1 Like

Hi, thank you so much for this! I also had to delete the “main: script.js” completely out of my json file and it worked!

1 Like