Cannot deploy html/ css/ JavaScript website

Netlify site name: mariav.art

2:47:42 AM: Build ready to start
2:47:45 AM: build-image version: 72a309a113b53ef075815b129953617827965e48 (focal)
2:47:45 AM: build-image tag: v4.8.2
2:47:45 AM: buildbot version: 72ebfe61ef7a5152002962d9129cc52f5b1bb560
2:47:46 AM: Fetching cached dependencies
2:47:46 AM: Failed to fetch cache, continuing with build
2:47:46 AM: Starting to prepare the repo for build
2:47:46 AM: No cached dependencies found. Cloning fresh repo
2:47:46 AM: git clone GitHub - mariavarg/mariavarg.github.io: This is my Own Personal Website!
2:48:03 AM: Preparing Git Reference refs/heads/main
2:48:05 AM: Parsing package.json dependencies
2:48:07 AM: Starting build script
2:48:07 AM: Installing dependencies
2:48:07 AM: Python version set to 2.7
2:48:08 AM: v16.15.1 is already installed.
2:48:09 AM: Now using node v16.15.1 (npm v8.11.0)
2:48:09 AM: Started restoring cached build plugins
2:48:09 AM: Finished restoring cached build plugins
2:48:09 AM: Attempting ruby version 2.7.2, read from environment
2:48:11 AM: Using ruby version 2.7.2
2:48:12 AM: Using PHP version 8.0
2:48:12 AM: Started restoring cached go cache
2:48:12 AM: Finished restoring cached go cache
2:48:12 AM: Installing Go version 1.17 (requested 1.17)
2:48:19 AM: unset GOOS;
2:48:19 AM: unset GOARCH;
2:48:19 AM: export GOROOT=β€˜/opt/buildhome/.gimme/versions/go1.17.linux.amd64’;
2:48:19 AM: export PATH=β€œ/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}”;
2:48:19 AM: go version >&2;
2:48:19 AM: export GIMME_ENV=β€œ/opt/buildhome/.gimme/env/go1.17.linux.amd64.env”
2:48:19 AM: go version go1.17 linux/amd64
2:48:19 AM: Installing missing commands
2:48:19 AM: Verify run directory
2:48:21 AM: ​
2:48:21 AM: ────────────────────────────────────────────────────────────────
2:48:21 AM: Netlify Build
2:48:21 AM: ────────────────────────────────────────────────────────────────
2:48:21 AM: ​
2:48:21 AM: ❯ Version
2:48:21 AM: @netlify/build 27.3.0
2:48:21 AM: ​
2:48:21 AM: ❯ Flags
2:48:21 AM: baseRelDir: true
2:48:21 AM: buildId: 62b79e9e70930d53ccbd0f72
2:48:21 AM: deployId: 62b79e9e70930d53ccbd0f74
2:48:21 AM: ​
2:48:21 AM: ❯ Current directory
2:48:21 AM: /opt/build/repo
2:48:21 AM: ​
2:48:21 AM: ❯ Config file
2:48:21 AM: No config file was defined: using default values.
2:48:21 AM: ​
2:48:21 AM: ❯ Context
2:48:21 AM: production
2:48:21 AM: ​
2:48:21 AM: ────────────────────────────────────────────────────────────────
2:48:21 AM: 1. Functions bundling
2:48:21 AM: ────────────────────────────────────────────────────────────────
2:48:21 AM: ​
2:48:21 AM: ​
2:48:21 AM: ────────────────────────────────────────────────────────────────
2:48:21 AM: Configuration error
2:48:21 AM: ────────────────────────────────────────────────────────────────
2:48:21 AM: ​
2:48:21 AM: Error message
2:48:21 AM: The Netlify Functions setting should target a directory, not a regular file: mariavarg.github.io/netlify/functions/main.js
2:48:21 AM: ​
2:48:21 AM: Resolved config
2:48:21 AM: build:
2:48:21 AM: publish: /opt/build/repo
2:48:21 AM: publishOrigin: ui
2:48:21 AM: functionsDirectory: /opt/build/repo/mariavarg.github.io/netlify/functions/main.js
2:48:22 AM: Caching artifacts
2:48:22 AM: Started saving build plugins
2:48:22 AM: Finished saving build plugins
2:48:22 AM: Started saving pip cache
2:48:22 AM: Finished saving pip cache
2:48:22 AM: Started saving emacs cask dependencies
2:48:22 AM: Finished saving emacs cask dependencies
2:48:22 AM: Started saving maven dependencies
2:48:22 AM: Finished saving maven dependencies
2:48:22 AM: Started saving boot dependencies
2:48:22 AM: Finished saving boot dependencies
2:48:22 AM: Started saving rust rustup cache
2:48:22 AM: Finished saving rust rustup cache
2:48:22 AM: Started saving go dependencies
2:48:22 AM: Finished saving go dependencies
2:48:23 AM: Creating deploy upload records
2:48:23 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:48:24 AM: Failing build: Failed to build site
2:48:24 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)
2:48:24 AM: Finished processing build request in 38.564982907s

You should remove the functions setting as it is incorrect

1 Like