Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I'm trying to host my site on Netlify through GitHub however I've received an error. It is built with vanilla JS, HTML and CSS. I was receiving an
exit code: 254
but then I created a package.json file and now I'm receiving
exit code: 1
. I have no issues when I run my website in develop mode. I've looked at various questions and answers however I haven't found a solution yet.
How can I fix this?
Deploy log
9:02:16 PM: Build ready to start
9:02:19 PM: build-image version: 6b66e79d54a8f76b01392124644c3052ac0d32ef
9:02:19 PM: build-image tag: v3.3.6
9:02:19 PM: buildbot version: 2ba6f2db8150441c8469e6ae3ab3561a2c9d03fa
9:02:19 PM: Fetching cached dependencies
9:02:19 PM: Starting to download cache of 254.9KB
9:02:19 PM: Finished downloading cache in 67.429279ms
9:02:19 PM: Starting to extract cache
9:02:19 PM: Failed to fetch cache, continuing with build
9:02:19 PM: Starting to prepare the repo for build
9:02:19 PM: No cached dependencies found. Cloning fresh repo
9:02:19 PM: git clone https://github.com/Rahni1/App-Dev-Portfolio
9:02:21 PM: Preparing Git Reference refs/heads/master
9:02:22 PM: Starting build script
9:02:22 PM: Installing dependencies
9:02:23 PM: v10.19.0 is already installed.
9:02:24 PM: Now using node v10.19.0 (npm v6.13.4)
9:02:24 PM: Attempting ruby version 2.6.2, read from environment
9:02:25 PM: Using ruby version 2.6.2
9:02:25 PM: Using PHP version 5.6
9:02:25 PM: Started restoring cached node modules
9:02:25 PM: Finished restoring cached node modules
9:02:26 PM: Installing NPM modules using NPM version 6.13.4
9:02:26 PM: npm
9:02:26 PM: notice created a lockfile as package-lock.json. You should commit this file.
9:02:26 PM: npm WARN
9:02:26 PM: [email protected] No description
9:02:27 PM: up to date in 0.347s
9:02:27 PM: found 0 vulnerabilities
9:02:27 PM: NPM modules installed
9:02:27 PM: Started restoring cached go cache
9:02:27 PM: Finished restoring cached go cache
9:02:27 PM: unset GOOS;
9:02:27 PM: unset GOARCH;
9:02:27 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
9:02:27 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
9:02:27 PM: go version >&2;
9:02:27 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
9:02:27 PM: go version go1.12 linux/amd64
9:02:27 PM: Installing missing commands
9:02:27 PM: Verify run directory
9:02:27 PM: Executing user command: npm run build
9:02:27 PM: npm
9:02:27 PM: ERR!
9:02:27 PM: missing script: build
9:02:27 PM: npm
9:02:27 PM: ERR! A complete log of this run can be found in:
9:02:27 PM: npm ERR! /opt/buildhome/.npm/_logs/2020-03-10T20_02_27_867Z-debug.log
9:02:27 PM: Skipping functions preparation step: no functions directory set
9:02:27 PM: Caching artifacts
9:02:27 PM: Started saving node modules
9:02:27 PM: Finished saving node modules
9:02:27 PM: Started saving pip cache
9:02:27 PM: Finished saving pip cache
9:02:27 PM: Started saving emacs cask dependencies
9:02:27 PM: Finished saving emacs cask dependencies
9:02:27 PM: Started saving maven dependencies
9:02:27 PM: Finished saving maven dependencies
9:02:27 PM: Started saving boot dependencies
9:02:28 PM: Finished saving boot dependencies
9:02:28 PM: Started saving go dependencies
9:02:28 PM: Finished saving go dependencies
9:02:30 PM: Error running command: Build script returned non-zero exit code: 1
9:02:30 PM: Failing build: Failed to build site
9:02:30 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
9:02:30 PM: Finished processing build request in 11.684569294s
Package.json
"name": "portfolio",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"repository": {
"type": "git",
"url": "git+https://github.com/Rahni1/App-Dev-Portfolio.git"
"author": "",
"license": "ISC",
"bugs": {
"url": "https://link-to-github-repo/issues"
"homepage": "https://link-to-github-repo#readme"
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.