https://starlit-dasik-2df8a2.netlify.app
1:59:33 PM: build-image version: a89f4ad50402ec92ae85e9b83fc50dcfb293df2e (focal)
1:59:33 PM: buildbot version: a89f4ad50402ec92ae85e9b83fc50dcfb293df2e
1:59:34 PM: Fetching cached dependencies
1:59:34 PM: Starting to download cache of 171.8KB
1:59:34 PM: Finished downloading cache in 83ms
1:59:34 PM: Starting to extract cache
1:59:34 PM: Finished extracting cache in 5ms
1:59:34 PM: Finished fetching cache in 115ms
1:59:34 PM: Starting to prepare the repo for build
1:59:34 PM: Preparing Git Reference refs/heads/main
1:59:34 PM: Parsing package.json dependencies
1:59:36 PM: Starting to install dependencies
1:59:36 PM: v16.19.1 is already installed.
1:59:36 PM: Now using node v16.19.1 (npm v8.19.3)
1:59:36 PM: Enabling Node.js Corepack
1:59:37 PM: Started restoring cached build plugins
1:59:37 PM: Finished restoring cached build plugins
1:59:37 PM: Started restoring cached corepack dependencies
1:59:37 PM: Finished restoring cached corepack dependencies
1:59:37 PM: No npm workspaces detected
1:59:37 PM: Started restoring cached node modules
1:59:37 PM: Finished restoring cached node modules
1:59:37 PM: Installing npm packages using npm version 8.19.3
1:59:37 PM: npm WARN old lockfile
1:59:37 PM: npm WARN old lockfile The package-lock.json file was created with an old version of npm,
1:59:37 PM: npm WARN old lockfile so supplemental metadata must be fetched from the registry.
1:59:37 PM: npm WARN old lockfile
1:59:37 PM: npm WARN old lockfile This is a one-time fix-up, please be patient…
1:59:37 PM: npm WARN old lockfile
1:59:38 PM: added 69 packages, and audited 70 packages in 1s
1:59:38 PM: 8 packages are looking for funding
1:59:38 PM: run npm fund
for details
1:59:38 PM: found 0 vulnerabilities
1:59:38 PM: npm packages installed
1:59:39 PM: Using PHP version 8.0
1:59:40 PM: Python version set to 3.8
1:59:40 PM: Attempting Ruby version 2.7.2, read from environment
1:59:41 PM: Using Ruby version 2.7.2
1:59:41 PM: Started restoring cached go cache
1:59:41 PM: Finished restoring cached go cache
1:59:41 PM: Installing Go version 1.19.5 (requested 1.19.5)
1:59:47 PM: go version go1.19.5 linux/amd64
1:59:47 PM: go version go1.19.5 linux/amd64
1:59:47 PM: go version go1.19.5 linux/amd64
1:59:47 PM: Install dependencies script success
1:59:47 PM: Starting build script
1:59:47 PM: Using stage install dependencies
1:59:48 PM: go version go1.19.5 linux/amd64
1:59:48 PM: Detected 0 framework(s)
1:59:48 PM: Section completed: initializing
1:59:50 PM:
1:59:50 PM: Netlify Build
1:59:50 PM: ────────────────────────────────────────────────────────────────
1:59:50 PM:
1:59:50 PM: ❯ Version
1:59:50 PM: @netlify/build 29.7.1
1:59:50 PM:
1:59:50 PM: ❯ Flags
1:59:50 PM: baseRelDir: true
1:59:50 PM: buildId: 641b4202c169e900088c1f13
1:59:50 PM: deployId: 641b4202c169e900088c1f15
1:59:50 PM:
1:59:50 PM: ❯ Current directory
1:59:50 PM: /opt/build/repo
1:59:50 PM:
1:59:50 PM: ❯ Config file
1:59:50 PM: No config file was defined: using default values.
1:59:50 PM:
1:59:50 PM: ❯ Context
1:59:50 PM: production
1:59:50 PM:
1:59:50 PM: 1. Build command from Netlify app
1:59:50 PM: ────────────────────────────────────────────────────────────────
1:59:50 PM:
1:59:50 PM: $ npm run build
1:59:50 PM: npm ERR! Missing script: “build”
1:59:50 PM: npm ERR!
1:59:50 PM: npm ERR! To see a list of scripts, run:
1:59:50 PM: npm ERR! npm run
1:59:50 PM: npm ERR! A complete log of this run can be found in:
1:59:50 PM: npm ERR! /opt/buildhome/.npm/_logs/2023-03-22T17_59_50_333Z-debug-0.log
1:59:50 PM:
1:59:50 PM: “build.command” failed
1:59:50 PM: ────────────────────────────────────────────────────────────────
1:59:50 PM:
1:59:50 PM: Error message
1:59:50 PM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
1:59:50 PM:
1:59:50 PM: Error location
1:59:50 PM: In Build command from Netlify app:
1:59:51 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)
1:59:50 PM: npm run build
1:59:50 PM:
1:59:50 PM: Resolved config
1:59:50 PM: build:
1:59:50 PM: command: npm run build
1:59:50 PM: commandOrigin: ui
1:59:50 PM: publish: /opt/build/repo
1:59:50 PM: publishOrigin: default
1:59:50 PM: Caching artifacts
1:59:50 PM: Started saving node modules
1:59:50 PM: Finished saving node modules
1:59:50 PM: Started saving build plugins
1:59:50 PM: Finished saving build plugins
1:59:50 PM: Started saving corepack cache
1:59:50 PM: Finished saving corepack cache
1:59:50 PM: Started saving pip cache
1:59:50 PM: Finished saving pip cache
1:59:50 PM: Started saving emacs cask dependencies
1:59:50 PM: Finished saving emacs cask dependencies
1:59:50 PM: Started saving maven dependencies
1:59:50 PM: Finished saving maven dependencies
1:59:50 PM: Started saving boot dependencies
1:59:50 PM: Finished saving boot dependencies
1:59:50 PM: Started saving rust rustup cache
1:59:50 PM: Finished saving rust rustup cache
1:59:50 PM: Started saving go dependencies
1:59:50 PM: Finished saving go dependencies
1:59:51 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
1:59:51 PM: Failing build: Failed to build site
1:59:51 PM: Finished processing build request in 17.932s
github repo
package.json
{
“name”: “jokesite”,
“version”: “1.0.0”,
“description”: “jokes”,
“main”: “server.js”,
“scripts”: {
“test”: “echo "Error: no test specified" && exit 1”,
“start”: “node server.js”,
“dev”: “nodemon server.js”
},
“author”: “”,
“license”: “ISC”,
“dependencies”: {
“axios”: “^1.3.0”,
“express”: “^4.18.2”,
“sv443-joke-api”: “^0.1.0”
}
}
So I guess I need to make a build script. How do I do that? Do I need to use another program to generate it? This is the simplest possible node app. No react, just html, js and css.