Hey, new to development, and wanted to set up a simple HTML static site. Having a difficult time getting the site setup though. I believe I created a package.json file, but Iβm not sure what the error that keeps failing my build is.
My site is: https://ryan-shumway-portfolio.netlify.app
The Full build log is below:
9:42:55 AM: Build ready to start
9:42:56 AM: build-image version: d2c6dbeac570350a387d832f64bc980dc964ad65 (focal)
9:42:56 AM: build-image tag: v4.8.0
9:42:56 AM: buildbot version: 29e546ddee264a16af472b38ccba15b350150213
9:42:56 AM: Fetching cached dependencies
9:42:57 AM: Starting to download cache of 13.4MB
9:42:57 AM: Finished downloading cache in 207.923876ms
9:42:57 AM: Starting to extract cache
9:42:57 AM: Finished extracting cache in 114.487299ms
9:42:57 AM: Finished fetching cache in 323.998366ms
9:42:57 AM: Starting to prepare the repo for build
9:42:57 AM: Preparing Git Reference refs/heads/main
9:42:58 AM: Parsing package.json dependencies
9:42:59 AM: Starting build script
9:42:59 AM: Installing dependencies
9:42:59 AM: Python version set to 2.7
9:42:59 AM: Downloading and installing node v16.15.0β¦
9:42:59 AM: Downloading https://nodejs.org/dist/v16.15.0/node-v16.15.0-linux-x64.tar.xzβ¦
9:43:00 AM: Computing checksum with sha256sum
9:43:00 AM: Checksums matched!
9:43:02 AM: Now using node v16.15.0 (npm v8.5.5)
9:43:02 AM: Started restoring cached build plugins
9:43:02 AM: Finished restoring cached build plugins
9:43:02 AM: Attempting ruby version 2.7.2, read from environment
9:43:03 AM: Using ruby version 2.7.2
9:43:04 AM: Using PHP version 8.0
9:43:04 AM: Started restoring cached go cache
9:43:04 AM: Finished restoring cached go cache
9:43:04 AM: go version go1.16.5 linux/amd64
9:43:04 AM: go version go1.16.5 linux/amd64
9:43:04 AM: Installing missing commands
9:43:04 AM: Verify run directory
9:43:05 AM: β
9:43:05 AM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
9:43:05 AM: Netlify Build
9:43:05 AM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
9:43:05 AM: β
9:43:05 AM: β― Version
9:43:05 AM: @netlify/build 27.1.1
9:43:05 AM: β
9:43:05 AM: β― Flags
9:43:05 AM: baseRelDir: true
9:43:05 AM: buildId: 6277e4ff6e3d85000847e370
9:43:05 AM: deployId: 6277e4ff6e3d85000847e372
9:43:05 AM: β
9:43:05 AM: β― Current directory
9:43:05 AM: /opt/build/repo
9:43:05 AM: β
9:43:05 AM: β― Config file
9:43:05 AM: No config file was defined: using default values.
9:43:05 AM: β
9:43:05 AM: β― Context
9:43:05 AM: production
9:43:05 AM: β
9:43:05 AM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
9:43:05 AM: 1. Build command from Netlify app
9:43:05 AM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
9:43:05 AM: β
9:43:05 AM: $ yarn run build
9:43:05 AM: yarn run v1.22.10
9:43:05 AM: error Couldnβt find a package.json file in β/opt/build/repoβ
info Visit yarn run | Yarn for documentation about this command.
9:43:05 AM: β
9:43:05 AM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
9:43:05 AM: βbuild.commandβ failed
9:43:05 AM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
9:43:05 AM: β
9:43:05 AM: Error message
9:43:05 AM: Command failed with exit code 1: yarn run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
9:43:05 AM: β
9:43:05 AM: Error location
9:43:05 AM: In Build command from Netlify app:
9:43:05 AM: yarn run build
9:43:05 AM: β
9:43:05 AM: Resolved config
9:43:05 AM: build:
9:43:05 AM: command: yarn run build
9:43:05 AM: commandOrigin: ui
9:43:05 AM: publish: /opt/build/repo/ark
9:43:05 AM: publishOrigin: ui
9:43:06 AM: Caching artifacts
9:43:06 AM: Started saving build plugins
9:43:06 AM: Finished saving build plugins
9:43:06 AM: Started saving pip cache
9:43:06 AM: Finished saving pip cache
9:43:06 AM: Started saving emacs cask dependencies
9:43:06 AM: Finished saving emacs cask dependencies
9:43:06 AM: Started saving maven dependencies
9:43:06 AM: Finished saving maven dependencies
9:43:06 AM: Started saving boot dependencies
9:43:06 AM: Finished saving boot dependencies
9:43:06 AM: Started saving rust rustup cache
9:43:07 AM: Creating deploy upload records
9:43:06 AM: Finished saving rust rustup cache
9:43:06 AM: Started saving go dependencies
9:43:06 AM: Finished saving go dependencies
9:43:07 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:43:07 AM: Failing build: Failed to build site
9:43:07 AM: Failed during stage βbuilding siteβ: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
9:43:08 AM: Finished processing build request in 11.156463619s
I have a package.json file, I attempted to connect a custom domain, but after that wasnβt working, I thought it might be easier to just use the default provided domain first, and thatβs not working. Any feedback on how to set up the site would be great. Thanks!