Im new to netlify and my build fails to deploy

7:59:44 PM: build-image version: ce7a344f62aa9efc00ccd8f75c73b02401369f5e (focal)
7:59:44 PM: buildbot version: ce7a344f62aa9efc00ccd8f75c73b02401369f5e
7:59:44 PM: Fetching cached dependencies
7:59:44 PM: Failed to fetch cache, continuing with build
7:59:44 PM: Starting to prepare the repo for build
7:59:44 PM: No cached dependencies found. Cloning fresh repo
7:59:44 PM: git clone --filter=blob:none GitHub - AlmogHasson/My-portfolio
7:59:45 PM: Preparing Git Reference refs/heads/main
7:59:45 PM: Parsing package.json dependencies
7:59:46 PM: Starting to install dependencies
7:59:46 PM: Python version set to 3.8
7:59:47 PM: Attempting Ruby version 2.7.2, read from environment
7:59:47 PM: Using Ruby version 2.7.2
7:59:48 PM: Started restoring cached go cache
7:59:48 PM: Finished restoring cached go cache
7:59:48 PM: Installing Go version 1.19.5 (requested 1.19.5)
7:59:52 PM: go version go1.19.5 linux/amd64
7:59:53 PM: Using PHP version 8.0
7:59:53 PM: Attempting Node.js version β€˜16.14.2’ from .nvmrc
7:59:54 PM: Downloading and installing node v16.14.2…
7:59:54 PM: Downloading https://nodejs.org/dist/v16.14.2/node-v16.14.2-linux-x64.tar.xz…
7:59:54 PM: Computing checksum with sha256sum
7:59:54 PM: Checksums matched!
7:59:56 PM: Now using node v16.14.2 (npm v8.5.0)
7:59:56 PM: Enabling Node.js Corepack
7:59:56 PM: Started restoring cached build plugins
7:59:56 PM: Finished restoring cached build plugins
7:59:56 PM: Started restoring cached corepack dependencies
7:59:56 PM: Finished restoring cached corepack dependencies
7:59:56 PM: No npm workspaces detected
7:59:56 PM: Started restoring cached node modules
7:59:56 PM: Finished restoring cached node modules
7:59:57 PM: Installing npm packages using npm version 8.5.0
7:59:58 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
8:00:01 PM: npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
8:00:02 PM: added 208 packages, and audited 209 packages in 5s
8:00:02 PM: 87 packages are looking for funding
8:00:02 PM: run npm fund for details
8:00:02 PM: found 0 vulnerabilities
8:00:02 PM: npm packages installed
8:00:02 PM: Install dependencies script success
8:00:02 PM: Starting build script
8:00:03 PM: Detected 1 framework(s)
8:00:03 PM: β€œparcel” at version β€œ2.8.3”
8:00:03 PM: Section completed: initializing
8:00:05 PM: ​
8:00:05 PM: Netlify Build
8:00:05 PM: ────────────────────────────────────────────────────────────────
8:00:05 PM: ​
8:00:05 PM: ❯ Version
8:00:05 PM: @netlify/build 29.11.2
8:00:05 PM: ​
8:00:05 PM: ❯ Flags
8:00:05 PM: baseRelDir: true
8:00:05 PM: buildId: 645bcd7a3357cb225f9c218e
8:00:05 PM: deployId: 645bcd7a3357cb225f9c2190
8:00:05 PM: ​
8:00:05 PM: ❯ Current directory
8:00:05 PM: /opt/build/repo
8:00:05 PM: ​
8:00:05 PM: ❯ Config file
8:00:05 PM: No config file was defined: using default values.
8:00:05 PM: ​
8:00:05 PM: ❯ Context
8:00:05 PM: production
8:00:05 PM: ​
8:00:05 PM: Build command from Netlify app
8:00:05 PM: ────────────────────────────────────────────────────────────────
8:00:05 PM: ​
8:00:05 PM: $ npm run build
8:00:05 PM: > simplefolio@1.0.1 build
8:00:05 PM: > parcel build
8:00:06 PM: :rotating_light: Build failed.
8:00:06 PM: parcel/core: src/index.html does not exist.
8:00:06 PM: /opt/build/repo/package.json:6:13
8:00:06 PM: 5 | β€œdescription”: "A clean, beautiful and responsive portfolio template f > 6 | β€œsource”: β€œsrc/index.html”,
8:00:06 PM: > | ^^^^^^^^^^^^^^^^
8:00:06 PM: 7 | β€œscripts”: {
8:00:06 PM: 8 | β€œstart”: β€œparcel”,
8:00:06 PM: ​
8:00:06 PM: β€œbuild.command” failed
8:00:06 PM: ────────────────────────────────────────────────────────────────
8:00:06 PM: ​
8:00:06 PM: Error message
8:00:06 PM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
8:00:06 PM: ​
8:00:06 PM: Error location
8:00:06 PM: In Build command from Netlify app:
8:00:06 PM: npm run build
8:00:06 PM: ​
8:00:06 PM: Resolved config
8:00:06 PM: build:
8:00:06 PM: command: npm run build
8:00:06 PM: commandOrigin: ui
8:00:06 PM: publish: /opt/build/repo/dist
8:00:06 PM: publishOrigin: ui
8:00:07 PM: Caching artifacts
8:00:07 PM: Started saving node modules
8:00:07 PM: Finished saving node modules
8:00:07 PM: Started saving build plugins
8:00:07 PM: Finished saving build plugins
8:00:07 PM: Started saving corepack cache
8:00:07 PM: Finished saving corepack cache
8:00:07 PM: Started saving pip cache
8:00:07 PM: Finished saving pip cache
8:00:07 PM: Started saving emacs cask dependencies
8:00:07 PM: Finished saving emacs cask dependencies
8:00:07 PM: Started saving maven dependencies
8:00:07 PM: Finished saving maven dependencies
8:00:07 PM: Started saving boot dependencies
8:00:07 PM: Finished saving boot dependencies
8:00:07 PM: Started saving rust rustup cache
8:00:07 PM: Finished saving rust rustup cache
8:00:07 PM: Started saving go dependencies
8:00:07 PM: Finished saving go dependencies
8:00:09 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
8:00:09 PM: Failing build: Failed to build site
8:00:09 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)
8:00:10 PM: Finished processing build request in 25.76s

Looking at the repository you are deploying from @AlmogHasson the above error is spot on: there is no index.html file in the repository.

1 Like

oh wow i missed that, i dragged all the files into my repository and didnt notice it just skipped my whole projetct, ty!

Glad you found your solution!