Netlify cannot find build command - build

I am trying to deploy my first gatsby site, with a blog but it keeps failing. Ive updated all my dependancies but now I cant figure out what exactly is the issue. I tried changing the build settinfs but not 100% if its correct.
github repo: https://github.com/ShuibCodes/Portfolio
5:35:20 PM: Error message
5:35:20 PM: Command failed with exit code 127: gatsby build
5:35:20 PM: ​
5:35:20 PM: Error location
5:35:20 PM: In Build command from Netlify app:
5:35:20 PM: gatsby build
5:35:20 PM: ​
5:35:20 PM: Resolved config
5:35:20 PM: build:
5:35:20 PM: command: gatsby build
5:35:20 PM: commandOrigin: ui
5:35:20 PM: publish: /opt/build/repo/Portfolio/Portfolio/gatsby-simplefolio/public

You have a weird Git project structure:
Portfolio/Portfolio/gatsby-simplefolio
gatsby-simplefolio should be at the first level of the repository.
Try cleaning up the structure and redo the process.
Netlify's trying to run a gatsby build command in a folder that doesn't have any configuration file because it's at the third level.

Related

How to deploy NextJs Minting App to Netlify without build errors?

I try it now for 3 days to fix what's wrong but nothing works for me can someone help?
Netlify Build Log:
6:31:18 PM: Build ready to start
6:31:20 PM: build-image version: d2c6dbeac570350a387d832f64bc980dc964ad65 (focal)
6:31:20 PM: build-image tag: v4.8.0
6:31:20 PM: buildbot version: 29e546ddee264a16af472b38ccba15b350150213
6:31:20 PM: Building without cache
6:31:20 PM: Starting to prepare the repo for build
6:31:21 PM: No cached dependencies found. Cloning fresh repo
6:31:21 PM: git clone https://github.com/Smokimcpot/MintingDiniTante
6:31:22 PM: Preparing Git Reference refs/heads/main
6:31:22 PM: Parsing package.json dependencies
6:31:23 PM: Starting build script
6:31:23 PM: Installing dependencies
6:31:23 PM: Python version set to 2.7
6:31:24 PM: Downloading and installing node v16.13.2...
6:31:24 PM: Downloading https://nodejs.org/dist/v16.13.2/node-v16.13.2-linux-x64.tar.xz...
6:31:25 PM: Computing checksum with sha256sum
6:31:25 PM: Checksums matched!
6:31:28 PM: Now using node v16.13.2 (npm v8.1.2)
6:31:28 PM: Started restoring cached build plugins
6:31:28 PM: Finished restoring cached build plugins
6:31:29 PM: Attempting ruby version 2.7.2, read from environment
6:31:30 PM: Using ruby version 2.7.2
6:31:30 PM: Using PHP version 8.0
6:31:31 PM: No npm workspaces detected
6:31:31 PM: Started restoring cached node modules
6:31:31 PM: Finished restoring cached node modules
6:31:31 PM: Found npm version (8.1.2) that doesn't match expected (8.4.0)
Installing npm at version 8.4.0
6:31:34 PM: removed 8 packages, changed 47 packages, and audited 218 packages in 3s
6:31:34 PM: 11 packages are looking for funding
6:31:34 PM: run `npm fund` for details
6:31:34 PM: 1 high severity vulnerability
6:31:34 PM: To address all issues, run:
6:31:34 PM: npm audit fix
6:31:34 PM: Run `npm audit` for details.
6:31:34 PM: NPM installed successfully
6:31:35 PM: Installing NPM modules using NPM version 8.4.0
6:31:37 PM: npm WARN deprecated ganache-core#2.13.2: ganache-core is now ganache; visit https://trfl.io/g7 for details
6:31:38 PM: npm WARN deprecated ganache-core#2.13.2: ganache-core is now ganache; visit https://trfl.io/g7 for details
6:31:49 PM: npm WARN deprecated har-validator#5.1.5: this library is no longer supported
6:31:51 PM: npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
6:31:51 PM: npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
6:31:56 PM: npm WARN deprecated testrpc#0.0.1: testrpc has been renamed to ganache-cli, please use this package from now on.
6:31:57 PM: npm WARN deprecated safe-event-emitter#1.0.1: Renamed to #metamask/safe-event-emitter
6:31:57 PM: npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
6:31:57 PM: npm WARN deprecated mkdirp-promise#5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
6:31:59 PM: npm WARN deprecated eth-sig-util#1.4.2: Deprecated in favor of '#metamask/eth-sig-util'
6:32:01 PM: npm WARN deprecated multibase#0.6.1: This module has been superseded by the multiformats module
6:32:01 PM: npm WARN deprecated multicodec#0.5.7: This module has been superseded by the multiformats module
6:32:02 PM: npm WARN deprecated #walletconnect/mobile-registry#1.4.0: Deprecated in favor of dynamic registry available from: https://github.com/walletconnect/walletconnect-registry
6:32:02 PM: npm WARN deprecated #types/web3#1.2.2: This is a stub types definition. web3 provides its own type definitions, so you do not need this installed.
6:32:05 PM: npm WARN deprecated uuid#3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
6:32:10 PM: npm WARN deprecated multicodec#1.0.4: This module has been superseded by the multiformats module
6:32:11 PM: npm WARN deprecated multibase#0.7.0: This module has been superseded by the multiformats module
6:32:27 PM: npm WARN deprecated cids#0.7.5: This module has been superseded by the multiformats module
6:32:28 PM: npm WARN deprecated #ensdomains/ens#0.4.5: Please use #ensdomains/ens-contracts
6:32:29 PM: npm WARN deprecated #ensdomains/resolver#0.2.4: Please use #ensdomains/ens-contracts
6:32:41 PM: added 2086 packages, and audited 2090 packages in 1m
6:32:41 PM: 221 packages are looking for funding
6:32:41 PM: run `npm fund` for details
6:32:41 PM: 54 vulnerabilities (11 moderate, 42 high, 1 critical)
6:32:41 PM: To address issues that do not require attention, run:
6:32:41 PM: npm audit fix
6:32:41 PM: Some issues need review, and may require choosing
6:32:41 PM: a different dependency.
6:32:41 PM: Run `npm audit` for details.
6:32:41 PM: NPM modules installed
6:32:41 PM: Started restoring cached go cache
6:32:41 PM: Finished restoring cached go cache
6:32:41 PM: go version go1.16.5 linux/amd64
6:32:41 PM: go version go1.16.5 linux/amd64
6:32:41 PM: Installing missing commands
6:32:41 PM: Verify run directory
6:32:43 PM: ​
6:32:43 PM: ────────────────────────────────────────────────────────────────
6:32:43 PM: Netlify Build
6:32:43 PM: ────────────────────────────────────────────────────────────────
6:32:43 PM: ​
6:32:43 PM: ❯ Version
6:32:43 PM: #netlify/build 27.1.1
6:32:43 PM: ​
6:32:43 PM: ❯ Flags
6:32:43 PM: baseRelDir: true
6:32:43 PM: buildId: 627d36568a0f640d7188d81e
6:32:43 PM: deployId: 627d36568a0f640d7188d820
6:32:43 PM: ​
6:32:43 PM: ❯ Current directory
6:32:43 PM: /opt/build/repo
6:32:43 PM: ​
6:32:43 PM: ❯ Config file
6:32:43 PM: No config file was defined: using default values.
6:32:43 PM: ​
6:32:43 PM: ❯ Context
6:32:43 PM: production
6:32:43 PM: ​
6:32:43 PM: ❯ Installing plugins
6:32:43 PM: - #netlify/plugin-nextjs#4.7.0
6:32:57 PM: ​
6:32:57 PM: ❯ Loading plugins
6:32:57 PM: - #netlify/plugin-nextjs#4.7.0 from Netlify app
6:32:58 PM: ​
6:32:58 PM: ────────────────────────────────────────────────────────────────
6:32:58 PM: 1. #netlify/plugin-nextjs (onPreBuild event)
6:32:58 PM: ────────────────────────────────────────────────────────────────
6:32:58 PM: ​
6:32:58 PM: No Next.js cache to restore.
6:32:58 PM: Netlify configuration property "build.environment.NEXT_PRIVATE_TARGET" value changed.
6:32:58 PM: ​
6:32:58 PM: (#netlify/plugin-nextjs onPreBuild completed in 17ms)
6:32:58 PM: ​
6:32:58 PM: ────────────────────────────────────────────────────────────────
6:32:58 PM: 2. Build command from Netlify app
6:32:58 PM: ────────────────────────────────────────────────────────────────
6:32:58 PM: ​
6:32:58 PM: $ npm run build
6:32:59 PM: > test-nft-dapp#0.1.0 build
6:32:59 PM: > next build
6:33:00 PM: warn - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
6:33:00 PM: info - Checking validity of types...
6:33:02 PM: ./pages/index.js
6:33:02 PM: 108:13 Warning: Do not use <img>. Use Image from 'next/image' instead. See: https://nextjs.org/docs/messages/no-img-element #next/next/no-img-element
6:33:02 PM: 108:13 Warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images. jsx-a11y/alt-text
6:33:02 PM: ./pages/mint.js
6:33:02 PM: 127:9 Warning: Do not use <img>. Use Image from 'next/image' instead. See: https://nextjs.org/docs/messages/no-img-element #next/next/no-img-element
6:33:02 PM: 127:9 Warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images. jsx-a11y/alt-text
6:33:02 PM: 166:17 Warning: Do not use <img>. Use Image from 'next/image' instead. See: https://nextjs.org/docs/messages/no-img-element #next/next/no-img-element
6:33:02 PM: 166:17 Warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images. jsx-a11y/alt-text
6:33:02 PM: info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
6:33:02 PM: info - Creating an optimized production build...
6:34:03 PM: info - Compiled successfully
6:34:03 PM: info - Collecting page data...
6:34:05 PM: > Build error occurred
6:34:05 PM: TypeError: Cannot read properties of undefined (reading 'includes')
6:34:05 PM: at Object.makeRestPayloadSender (/opt/build/repo/node_modules/#alch/alchemy-web3/dist/cjs/web3-adapter/sendRestPayload.js:16:14)
6:34:05 PM: at Object.makeAlchemyContext (/opt/build/repo/node_modules/#alch/alchemy-web3/dist/cjs/web3-adapter/alchemyContext.js:18:40)
6:34:05 PM: at createAlchemyWeb3 (/opt/build/repo/node_modules/#alch/alchemy-web3/dist/cjs/index.js:21:31)
6:34:05 PM: at Object.3677 (/opt/build/repo/.next/server/pages/mint.js:488:14)
6:34:05 PM: at __webpack_require__ (/opt/build/repo/.next/server/webpack-runtime.js:25:42)
6:34:05 PM: at /opt/build/repo/.next/server/pages/mint.js:171:73
6:34:05 PM: at Function.__webpack_require__.a (/opt/build/repo/.next/server/webpack-runtime.js:103:13)
6:34:05 PM: at Object.8966 (/opt/build/repo/.next/server/pages/mint.js:159:21)
6:34:05 PM: at __webpack_require__ (/opt/build/repo/.next/server/webpack-runtime.js:25:42)
6:34:05 PM: at __webpack_exec__ (/opt/build/repo/.next/server/pages/mint.js:794:39)
6:34:05 PM: at /opt/build/repo/.next/server/pages/mint.js:795:28
6:34:05 PM: at Object.<anonymous> (/opt/build/repo/.next/server/pages/mint.js:798:3)
6:34:05 PM: at Module._compile (node:internal/modules/cjs/loader:1101:14)
6:34:05 PM: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
6:34:05 PM: at Module.load (node:internal/modules/cjs/loader:981:32)
6:34:05 PM: at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
6:34:05 PM: type: 'TypeError'
6:34:05 PM: }
6:34:05 PM: ​
6:34:05 PM: ────────────────────────────────────────────────────────────────
6:34:05 PM: "build.command" failed
6:34:05 PM: ────────────────────────────────────────────────────────────────
6:34:05 PM: ​
6:34:05 PM: Error message
6:34:05 PM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
6:34:05 PM: ​
6:34:05 PM: Error location
6:34:05 PM: In Build command from Netlify app:
6:34:05 PM: npm run build
6:34:05 PM: ​
6:34:05 PM: Resolved config
6:34:05 PM: build:
6:34:05 PM: command: npm run build
6:34:05 PM: commandOrigin: ui
6:34:05 PM: environment:
6:34:05 PM: - NODE_VERSION
6:34:05 PM: - NPM_VERSION
6:34:05 PM: - NEXT_PRIVATE_TARGET
6:34:05 PM: publish: /opt/build/repo/.next
6:34:05 PM: publishOrigin: ui
6:34:05 PM: plugins:
6:34:05 PM: - inputs: {}
6:34:05 PM: origin: ui
6:34:05 PM: package: '#netlify/plugin-nextjs'
6:34:05 PM: Caching artifacts
6:34:05 PM: Started saving node modules
6:34:05 PM: Finished saving node modules
6:34:05 PM: Started saving build plugins
6:34:05 PM: Finished saving build plugins
6:34:05 PM: Started saving pip cache
6:34:05 PM: Finished saving pip cache
6:34:05 PM: Started saving emacs cask dependencies
6:34:05 PM: Finished saving emacs cask dependencies
6:34:05 PM: Started saving maven dependencies
6:34:05 PM: Finished saving maven dependencies
6:34:05 PM: Started saving boot dependencies
6:34:07 PM: Creating deploy upload records
6:34:05 PM: Finished saving boot dependencies
6:34:05 PM: Started saving rust rustup cache
6:34:05 PM: Finished saving rust rustup cache
6:34:05 PM: Started saving go dependencies
6:34:05 PM: Finished saving go dependencies
6:34:07 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:34:07 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
6:34:07 PM: Failing build: Failed to build site
6:34:07 PM: Finished processing build request in 2m47.154914109s

Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)

// I got an error on build i have already added CI commands as well
12:11:23 PM: ────────────────────────────────────────────────────────────────
12:11:23 PM: 1. Build command from Netlify app
12:11:23 PM: ────────────────────────────────────────────────────────────────
12:11:23 PM:
12:11:23 PM: npm run build
12:11:23 PM: > prime-restro#0.1.0 build
12:11:23 PM: > CI= react-scripts build
12:11:25 PM: Creating an optimized production build...
12:11:47 PM: Failed to compile.
12:11:47 PM:
12:11:47 PM: static/css/main.00f32189.css from Css Minimizer plugin
12:11:47 PM: /opt/build/repo/static/css/main.00f32189.css:80:26: Missed semicolon [webpack://./src/index.css:79,8][static/css/main.00f32189.css:80,26]
12:11:47 PM: ​
12:11:47 PM: ────────────────────────────────────────────────────────────────
12:11:47 PM: "build.command" failed
12:11:47 PM: ────────────────────────────────────────────────────────────────
12:11:47 PM: ​
12:11:47 PM: Error message
12:11:47 PM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
12:11:47 PM: ​
12:11:47 PM: Error location
12:11:47 PM: In Build command from Netlify app:
12:11:47 PM: npm run build
12:11:47 PM: ​
12:11:47 PM: Resolved config
12:11:47 PM: build:
12:11:47 PM: command: npm run build
12:11:47 PM: commandOrigin: ui
12:11:47 PM: environment:
12:11:47 PM: - CI
12:11:47 PM: publish: /opt/build/repo/build
12:11:47 PM: publishOrigin: ui
12:11:48 PM: Caching artifacts
12:11:48 PM: Started saving node modules
12:11:48 PM: Finished saving node modules
12:11:48 PM: Started saving build plugins
12:11:48 PM: Finished saving build plugins
12:11:48 PM: Started saving pip cache
12:11:48 PM: Finished saving pip cache
12:11:48 PM: Started saving emacs cask dependencies
12:11:48 PM: Finished saving emacs cask dependencies
12:11:48 PM: Started saving maven dependencies
12:11:48 PM: Finished saving maven dependencies
12:11:48 PM: Started saving boot dependencies
12:11:48 PM: Finished saving boot dependencies
12:11:48 PM: Started saving rust rustup cache
12:11:48 PM: Finished saving rust rustup cache
12:11:48 PM: Started saving go dependencies
12:11:49 PM: Finished saving go dependencies
12:11:51 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
12:11:51 PM: Creating deploy upload records
12:11:51 PM: Failing build: Failed to build site
12:11:51 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
12:11:51 PM: Finished processing build request in 1m24.500766139s

NextJS deployment on AWS amplify issue (frontend + incompatible module)

I deploy the nextjs project by connecting the github repo, the provision passes, the backend is built, but the frontend fails to build. Here is the log with the error:
# Starting phase: preBuild
# Executing command: yarn install
2021-12-13T06:55:51.568Z [INFO]: yarn install v1.22.0
2021-12-13T06:55:51.620Z [INFO]: [1/4] Resolving packages...
2021-12-13T06:55:51.815Z [INFO]: [2/4] Fetching packages...
2021-12-13T06:56:02.529Z [WARNING]: error next#12.0.7: The engine "node" is incompatible with this module. Expected version ">=12.22.0". Got "12.21.0"
2021-12-13T06:56:02.537Z [WARNING]: error Found incompatible module.
2021-12-13T06:56:02.538Z [INFO]: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
2021-12-13T06:56:02.550Z [ERROR]: !!! Build failed
2021-12-13T06:56:02.552Z [ERROR]: !!! Non-Zero Exit Code detected
2021-12-13T06:56:02.552Z [INFO]: # Starting environment caching...
2021-12-13T06:56:02.552Z [INFO]: # Environment caching completed
Terminating logging...
The build settings:
version: 1
frontend:
phases:
preBuild:
commands:
- yarn install
build:
commands:
- yarn run build
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- node_modules/**/*
I really do not know how to fix this, is it an AWS issue or my project has outdated packages? Any help would be appreciated 😄.
To fix this issue you have to tell Amplify which version of NodeJS to use.
Go To:
Build Settings
At the bottom is Edit Build image settings
Click Add Package Overide
Set your NodeJS version
This worked for me.

Netlify + Cactus: failed during stage 'building site': Build script returned non-zero exit code: 1

Im following this guide on how to deploy a django app using cactus on netlify:
https://www.netlify.com/blog/2016/04/08/a-step-by-step-guide-cactus-on-netlify/#building-your-site
I created a new private github repo and pushed the cactus stuff to it as per the docs.
However, when I try to deploy it on netlify, I get this error:
12:31:56 PM: [feature enabled]: Nitro deploys enabled. Buckle up! ⚡️
12:31:56 PM: Build ready to start
12:32:03 PM: build-image version: blablabla
12:32:03 PM: build-image tag: v3.3.6
12:32:03 PM: buildbot version: blablabla
12:32:03 PM: Fetching cached dependencies
12:32:04 PM: Failed to fetch cache, continuing with build
12:32:04 PM: Starting to prepare the repo for build
12:32:04 PM: No cached dependencies found. Cloning fresh repo
12:32:04 PM: git clone https://github.com/blablabla/blablabla
12:32:05 PM: Preparing Git Reference refs/heads/master
12:32:05 PM: Starting build script
12:32:05 PM: Installing dependencies
12:32:06 PM: v10.19.0 is already installed.
12:32:07 PM: Now using node v10.19.0 (npm v6.13.4)
12:32:07 PM: Attempting ruby version 2.6.2, read from environment
12:32:08 PM: Using ruby version 2.6.2
12:32:08 PM: Using PHP version 5.6
12:32:08 PM: Installing pip dependencies
12:32:08 PM: Started restoring cached pip cache
12:32:09 PM: Finished restoring cached pip cache
12:32:09 PM: DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
12:32:09 PM: Collecting boto==2.49.0
12:32:09 PM: Downloading boto-2.49.0-py2.py3-none-any.whl (1.4 MB)
12:32:10 PM: Collecting cactus==3.3.3
12:32:10 PM: Downloading Cactus-3.3.3-py2.py3-none-any.whl (313 kB)
12:32:10 PM: Requirement already satisfied: certifi==2019.11.28 in /opt/buildhome/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 3)) (2019.11.28)
12:32:10 PM: Collecting colorama==0.4.3
12:32:10 PM: Downloading colorama-0.4.3-py2.py3-none-any.whl (15 kB)
12:32:10 PM: Collecting colorlog==4.1.0
12:32:10 PM: Downloading colorlog-4.1.0-py2.py3-none-any.whl (14 kB)
12:32:10 PM: Collecting django==1.6.11
12:32:10 PM: Downloading Django-1.6.11-py2.py3-none-any.whl (6.7 MB)
12:32:11 PM: Collecting django-markwhat==1.6.2
12:32:11 PM: Downloading django_markwhat-1.6.2-py2.py3-none-any.whl (8.2 kB)
12:32:12 PM: Collecting keyring==5.7.1
12:32:12 PM: Downloading keyring-5.7.1-py2.py3-none-any.whl (60 kB)
12:32:12 PM: Collecting markdown2==2.3.8
12:32:12 PM: Downloading markdown2-2.3.8-py2.py3-none-any.whl (33 kB)
12:32:12 PM: Requirement already satisfied: six==1.14.0 in /opt/buildhome/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 10)) (1.14.0)
12:32:12 PM: ERROR: Could not find a version that satisfies the requirement tornado==6.0.4 (from -r requirements.txt (line 11)) (from versions: 0.2, 1.0, 1.1, 1.1.1, 1.2, 1.2.1, 2.0, 2.1, 2.1.1, 2.2, 2.2.1, 2.3, 2.4, 2.4.1, 3.0, 3.0.1, 3.0.2, 3.1, 3.1.1, 3.2, 3.2.1, 3.2.2, 4.0, 4.0.1, 4.0.2, 4.1b2, 4.1, 4.2b1, 4.2, 4.2.1, 4.3b1, 4.3b2, 4.3, 4.4b1, 4.4, 4.4.1, 4.4.2, 4.4.3, 4.5b1, 4.5b2, 4.5, 4.5.1, 4.5.2, 4.5.3, 5.0a1, 5.0b1, 5.0, 5.0.1, 5.0.2, 5.1b1, 5.1, 5.1.1)
12:32:12 PM: ERROR: No matching distribution found for tornado==6.0.4 (from -r requirements.txt (line 11))
12:32:12 PM: Error installing pip dependencies
12:32:12 PM: Error running command: Build script returned non-zero exit code: 1
12:32:12 PM: Failing build: Failed to build site
12:32:12 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
12:32:12 PM: Finished processing build request in 9.467329843s
I havent changed anything inside the cactus directory.
Also, I am using a virtual environment with python 3.7, and not python 2.7.
Thank you
I encountered the same challenges.
From the error log
12:32:09 PM: DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
That means the deploy is done with Python 2.7, and tornado 6.0.4 was installed during cactus dependencies installation, which is not compatible with Python 2.7.
You could downgrade tornado to 5.1.1 by using $ pip install tornado==5.1.1
I hope this helped.

Netlify build failed with non-zero exit code: 1

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: portfolio#1.0.0 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"
}
Netlify tries to run npm run build. Your package.json does not contain such a script, you need to add one and try again.
I am not sure if it gonna helps you but try to change your build command to
CI= npm run build