Netlify Deploy Command failed with exit code 254: npm run build-studio && cp studio/netlify.toml studio/dist - deployment

Please help! I’m a newb! Trying to deploy my first site on Netlify, using Sanity’s Gatsby portfolio template. It deployed just fine the first time, then I did some edits and now it fails with “Command failed with exit code 254: npm run build-studio && cp studio/netlify.toml studio/dist”. The site has always built and run locally with no issues.
I’ve tried many things, like deleting package-lock.json &/or node_modules folder in the root as well as in the studio and web folders and running “npm install” again. Tried “npm update” in root and studio and web folders. Tried tinkering with the postinstall script in the root folder’s package.json file. Tried running “npm install --force --legacy-peer-deps”. Tried cleaning my cache in root, studio and web folders. Basically tried everything I saw in the Netlify forums and Stackoverflow forums and elsewhere when googling my issue…
Here is the github repo: https://github.com/ericerodgers/portfolio.
Here is where the deploy seems to break:
11:01:47 PM: lerna info Installing external dependencies
11:04:48 PM: lerna ERR! npm ci exited 254 in ‘sanity-gatsby-portfolio-studio’
11:04:48 PM: lerna ERR! npm ci stderr:
11:04:48 PM: npm WARN tarball tarball data for which-
module#https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz (sha1-
2e8H3Od7mQK4o6j6SzHD4/fm6Ho=) seems to be corrupted. Trying again.
Here is the error message after lines and lines of “npm WARN tarball tarball data…”:
11:04:48 PM: “build.command” failed
11:04:48 PM: ────────────────────────────────────────────────────────────────
11:04:48 PM: ​
11:04:48 PM: Error message
11:04:48 PM: Command failed with exit code 254: npm run build-studio && cp
studio/netlify.toml studio/dist
11:04:48 PM: ​
11:04:48 PM: Error location
11:04:48 PM: In Build command from Netlify app:
11:04:48 PM: npm run build-studio && cp studio/netlify.toml studio/dist
11:04:48 PM: ​
11:04:48 PM: Resolved config
11:04:48 PM: build:
11:04:48 PM: base: /opt/build/repo
11:04:48 PM: command: npm run build-studio && cp studio/netlify.toml studio/dist
11:04:48 PM: commandOrigin: ui
11:04:48 PM: environment:
11:04:48 PM: - NETLIFY_BUILD_DEBUG
11:04:48 PM: publish: /opt/build/repo/studio/dist
11:04:48 PM: publishOrigin: ui
Here is the full deploy log (minus a large chunk of the “npm WARN tarball tarball data…” lines):
11:01:25 PM: build-image version: fa439ad1ab9393b2c0d449d8d7c033927683f4b0
11:01:25 PM: build-image tag: v4.3.0
11:01:25 PM: buildbot version: bfa1ece451875e5fe124c5b0a59bb85e0abb8d50
11:01:25 PM: Fetching cached dependencies
11:01:25 PM: Starting to download cache of 147.2MB
11:01:27 PM: Finished downloading cache in 1.527898759s
11:01:27 PM: Starting to extract cache
11:01:32 PM: Finished extracting cache in 5.608708305s
11:01:32 PM: Finished fetching cache in 7.332795262s
11:01:32 PM: Starting to prepare the repo for build
11:01:33 PM: Preparing Git Reference refs/heads/main
11:01:34 PM: Parsing package.json dependencies
11:01:34 PM:
​
❯ Initial build environment
baseRelDir: true
branch: main
context: production
cwd: /opt/build/repo
featureFlags: []
mode: buildbot
repositoryRoot: /opt/build/repo
siteId: 0e615e6e-e933-48da-a5c5-0e7c3826be41
​
❯ UI build settings
baseRelDir: true
build:
base: /
command: npm run build-studio && cp studio/netlify.toml studio/dist
environment:
- NETLIFY_BUILD_DEBUG
publish: /studio/dist
​
❯ Resolved build environment
branch: main
buildDir: /opt/build/repo
context: production
env: []
​
❯ Resolved config
build:
base: /opt/build/repo
command: npm run build-studio && cp studio/netlify.toml studio/dist
commandOrigin: ui
environment:
- NETLIFY_BUILD_DEBUG
publish: /opt/build/repo/studio/dist
publishOrigin: ui
11:01:34 PM: Different build dir detected, going to use the one specified in the Netlify configuration file: '' versus '/' in the Netlify UI
11:01:34 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'studio/dist' versus '/studio/dist' in the Netlify UI
11:01:35 PM: Starting build script
11:01:35 PM: Installing dependencies
11:01:35 PM: Python version set to 2.7
11:01:35 PM: Started restoring cached node version
11:01:39 PM: Finished restoring cached node version
11:01:40 PM: v16.9.1 is already installed.
11:01:40 PM: Now using node v16.9.1 (npm v7.21.1)
11:01:41 PM: Started restoring cached build plugins
11:01:41 PM: Finished restoring cached build plugins
11:01:41 PM: Attempting ruby version 2.7.2, read from environment
11:01:43 PM: Using ruby version 2.7.2
11:01:43 PM: Using PHP version 8.0
11:01:43 PM: Started restoring cached node modules
11:01:43 PM: Finished restoring cached node modules
11:01:43 PM: Started restoring cached go cache
11:01:43 PM: Finished restoring cached go cache
11:01:44 PM: go version go1.16.5 linux/amd64
11:01:44 PM: go version go1.16.5 linux/amd64
11:01:44 PM: Installing missing commands
11:01:44 PM: Verify run directory
11:01:45 PM: ​
11:01:45 PM: ────────────────────────────────────────────────────────────────
11:01:45 PM: Netlify Build
11:01:45 PM: ────────────────────────────────────────────────────────────────
11:01:45 PM: ​
11:01:45 PM: ❯ Version
11:01:45 PM: #netlify/build 18.8.0
11:01:45 PM: ​
11:01:45 PM: ❯ Flags
11:01:45 PM: apiHost: api.netlify.com
11:01:45 PM: baseRelDir: true
11:01:45 PM: branch: main
11:01:45 PM: buildId: 613d6d7bf1748000085c421b
11:01:45 PM: buildbotServerSocket: /tmp/netlify-buildbot-socket
11:01:45 PM: cacheDir: /opt/build/cache
11:01:45 PM: cachedConfigPath: /tmp/netlify_config.json
11:01:45 PM: context: production
11:01:45 PM: cwd: /opt/build/repo
11:01:45 PM: deployId: 613d6d7bf1748000085c421d
11:01:45 PM: featureFlags:
11:01:45 PM: - zisiEsbuildDynamicImports
11:01:45 PM: framework: unknown
11:01:45 PM: functionsDistDir: /tmp/zisi-613d6d7bf1748000085c421d
11:01:45 PM: mode: buildbot
11:01:45 PM: nodePath: /opt/buildhome/.nvm/versions/node/v16.9.1/bin/node
11:01:45 PM: repositoryRoot: /opt/build/repo
11:01:45 PM: saveConfig: true
11:01:45 PM: sendStatus: true
11:01:45 PM: siteId: 0e615e6e-e933-48da-a5c5-0e7c3826be41
11:01:45 PM: statsd:
11:01:45 PM: host: datadog-agent
11:01:45 PM: port: 8125
11:01:45 PM: testOpts:
11:01:45 PM: silentLingeringProcesses: ''
11:01:45 PM: ​
11:01:45 PM: ❯ Current directory
11:01:45 PM: /opt/build/repo
11:01:45 PM: ​
11:01:45 PM: ❯ Config file
11:01:45 PM: No config file was defined: using default values.
11:01:45 PM: ​
11:01:45 PM: ❯ Resolved config
11:01:45 PM: build:
11:01:45 PM: base: /opt/build/repo
11:01:45 PM: command: npm run build-studio && cp studio/netlify.toml studio/dist
11:01:45 PM: commandOrigin: ui
11:01:45 PM: environment:
11:01:45 PM: - NETLIFY_BUILD_DEBUG
11:01:45 PM: publish: /opt/build/repo/studio/dist
11:01:45 PM: publishOrigin: ui
11:01:45 PM: ​
11:01:45 PM: ❯ Context
11:01:45 PM: production
11:01:45 PM: ​
11:01:45 PM: ────────────────────────────────────────────────────────────────
11:01:45 PM: 1. Build command from Netlify app
11:01:45 PM: ────────────────────────────────────────────────────────────────
11:01:45 PM: ​
11:01:45 PM: $ npm run build-studio && cp studio/netlify.toml studio/dist
11:01:46 PM: > sanity-gatsby-portfolio#0.0.0 build-studio
11:01:46 PM: > lerna bootstrap && (cd studio && npm run build)
11:01:46 PM: lerna notice cli v4.0.0
11:01:46 PM: lerna info ci enabled
11:01:47 PM: lerna info Bootstrapping 2 packages
11:01:47 PM: lerna info Installing external dependencies
11:04:48 PM: lerna ERR! npm ci exited 254 in 'sanity-gatsby-portfolio-studio'
11:04:48 PM: lerna ERR! npm ci stderr:
11:04:48 PM: npm WARN tarball tarball data for which-module#https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz (sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=) seems to be corrupted. Trying again.
11:04:48 PM: npm WARN tarball tarball data for normalize-path#https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz (sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=) seems to be corrupted. Trying again.
11:04:48 PM: npm ERR! code ENOENT
11:04:48 PM: npm ERR! syscall lstat
11:04:48 PM: npm ERR! path /opt/buildhome/.npm/_cacache/content-v2/sha1/b5/24/3d8f3ec1aa35f1364605bc0d1036e30ab69f
11:04:48 PM: npm ERR! errno -2
11:04:48 PM: npm ERR! enoent ENOENT: no such file or directory, lstat '/opt/buildhome/.npm/_cacache/content-v2/sha1/b5/24/3d8f3ec1aa35f1364605bc0d1036e30ab69f'
11:04:48 PM: npm ERR! enoent This is related to npm not being able to find a file.
11:04:48 PM: npm ERR! enoent
11:04:48 PM: npm ERR! A complete log of this run can be found in:
11:04:48 PM: npm ERR! /opt/buildhome/.npm/_logs/2021-09-12T03_04_47_826Z-debug.log
11:04:48 PM: lerna ERR! npm ci exited 254 in 'sanity-gatsby-portfolio-studio'
11:04:48 PM: ​
11:04:48 PM: ────────────────────────────────────────────────────────────────
11:04:48 PM: "build.command" failed
11:04:48 PM: ────────────────────────────────────────────────────────────────
11:04:48 PM: ​
11:04:48 PM: Error message
11:04:48 PM: Command failed with exit code 254: npm run build-studio && cp studio/netlify.toml studio/dist
11:04:48 PM: ​
11:04:48 PM: Error location
11:04:48 PM: In Build command from Netlify app:
11:04:48 PM: npm run build-studio && cp studio/netlify.toml studio/dist
11:04:48 PM: ​
11:04:48 PM: Resolved config
11:04:48 PM: build:
11:04:48 PM: base: /opt/build/repo
11:04:48 PM: command: npm run build-studio && cp studio/netlify.toml studio/dist
11:04:48 PM: commandOrigin: ui
11:04:48 PM: environment:
11:04:48 PM: - NETLIFY_BUILD_DEBUG
11:04:48 PM: publish: /opt/build/repo/studio/dist
11:04:48 PM: publishOrigin: ui
11:04:48 PM: Caching artifacts
11:04:48 PM: Started saving node modules
11:04:48 PM: Finished saving node modules
11:04:48 PM: Started saving build plugins
11:04:48 PM: Finished saving build plugins
11:04:48 PM: Started saving pip cache
11:04:48 PM: Finished saving pip cache
11:04:48 PM: Started saving emacs cask dependencies
11:04:48 PM: Finished saving emacs cask dependencies
11:04:48 PM: Started saving maven dependencies
11:04:48 PM: Finished saving maven dependencies
11:04:48 PM: Started saving boot dependencies
11:04:48 PM: Finished saving boot dependencies
11:04:48 PM: Started saving rust rustup cache
11:04:48 PM: Finished saving rust rustup cache
11:04:48 PM: Started saving go dependencies
11:04:48 PM: Finished saving go dependencies
11:04:48 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:04:48 PM: Failing build: Failed to build site
11:04:48 PM: Finished processing build request in 3m23.585558362s```

I got this question answered with the help of #coelmay in the netlify forums...
https://answers.netlify.com/t/netlify-deploy-command-failed-with-exit-code-254-npm-run-build-studio-cp-studio-netlify-toml-studio-dist/44017/2
I deleted the yarn.lock file, deleted "&& lerna bootstrap" from the studio build script, and edited netlify.toml file to read:
[build]
command = "CI= npm run build"
I deployed to netlify from the root portfolio folder with these changes and the sanity studio build completed, but the gatsby website failed with some error codes indicating problems with the sanity schema… In the Sanity.io UI I saw an error message asking if I wanted to delete a schema I thought I’d already successfully deleted, and I confirmed the delete. I redeployed graphql locally and redeployed the site one last time and now everything works!
I don’t really know how or why I had a yarn.lock file or why the studio build script include “lerna bootstrap”, I didn’t really do very major alterations to the sanity/gatsby portfolio template I found on sanity.io… I mainly just added new content.
Big thanks to #coelmay in the netlify forum for helping me with this. And good luck to anyone else who has a similar problem tweaking and deploying this sanity/gatsby portfolio template!

Related

How to deploy nextjs site to netlify and avoid build.command failed error

As I'am trying to deploy my site through netlify I always getting the following error.
Until no solution has worked for me.
Tried to set a new Environment setting variable "CI false".
Now I'm a bit lost.
Hope there is anyone who can help me out.
7:53:34 PM: ────────────────────────────────────────────────────────────────
7:53:34 PM: "build.command" failed
7:53:34 PM: ────────────────────────────────────────────────────────────────
7:53:34 PM: ​
7:53:34 PM: Error message
7:53:34 PM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
7:53:34 PM: ​
7:53:34 PM: Error location
7:53:34 PM: In Build command from Netlify app:
7:53:34 PM: npm run build
7:53:34 PM: ​
7:53:34 PM: Resolved config
7:53:34 PM: build:
7:53:34 PM: command: npm run build
7:53:34 PM: commandOrigin: ui
7:53:34 PM: environment:
7:53:34 PM: - CI
7:53:34 PM: - NEXT_PRIVATE_TARGET
7:53:34 PM: publish: /opt/build/repo/.next
7:53:34 PM: publishOrigin: ui
7:53:34 PM: plugins:
7:53:34 PM: - inputs: {}
7:53:34 PM: origin: ui
7:53:34 PM: package: '#netlify/plugin-nextjs'
7:53:34 PM: Caching artifacts
7:53:34 PM: Started saving node modules
7:53:34 PM: Finished saving node modules
7:53:34 PM: Started saving build plugins
7:53:34 PM: Finished saving build plugins
7:53:34 PM: Started saving pip cache
7:53:34 PM: Finished saving pip cache
7:53:34 PM: Started saving emacs cask dependencies
7:53:34 PM: Finished saving emacs cask dependencies
7:53:34 PM: Started saving maven dependencies
7:53:34 PM: Finished saving maven dependencies
7:53:34 PM: Started saving boot dependencies
7:53:34 PM: Finished saving boot dependencies
7:53:34 PM: Started saving rust rustup cache
7:53:34 PM: Finished saving rust rustup cache
7:53:34 PM: Started saving go dependencies
7:53:34 PM: Finished saving go dependencies
7:53:35 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
7:53:35 PM: Creating deploy upload records
7:53:35 PM: Failing build: Failed to build site
7:53:35 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
7:53:35 PM: Finished processing build request in 48.628409133s
For better understanding I will add my package.json file down below as well.
{
"name": "cryptocheck24",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"#heroicons/react": "^2.0.10",
"#portabletext/react": "^1.0.6",
"#sanity/client": "^3.3.6",
"#sanity/image-url": "^1.0.1",
"flowbite": "^1.5.3",
"flowbite-react": "^0.1.11",
"groq": "^2.29.3",
"next": "12.2.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"tippy.js": "^6.3.7"
},
"devDependencies": {
"autoprefixer": "^10.4.8",
"eslint": "8.23.0",
"eslint-config-next": "12.2.5",
"postcss": "^8.4.16",
"tailwindcss": "^3.1.8"
}
}

Gatsby - Build exceeded maximum allowed runtime

I'm looking for a solution to the issue with netlify deploy. Everything was working fine until I see Build exceeded maximum allowed runtime at the very end of the deploy logs. It's a Gatsby Site with a Contentful CMS. 2-3 days back deployment was working fine, I don't know what the issue is. Please, help me with the issue.
7:18:32 PM: Build ready to start
7:18:34 PM: build-image version: 0e2f4c52031ab562db66aec633308326e3b108d0 (focal)
7:18:34 PM: build-image tag: focal
7:18:34 PM: buildbot version: ed990b4b6588208e959ba45b6b7b05738f8b6004
7:18:34 PM: Fetching cached dependencies
7:18:34 PM: Failed to fetch cache, continuing with build
7:18:34 PM: Starting to prepare the repo for build
7:18:35 PM: No cached dependencies found. Cloning fresh repo
7:18:35 PM: git clone https://github.com/pbit0x/Flow-It-All
7:18:36 PM: Preparing Git Reference refs/heads/master
7:18:36 PM: Parsing package.json dependencies
7:18:38 PM: Starting build script
7:18:38 PM: Installing dependencies
7:18:38 PM: Python version set to 2.7
7:18:38 PM: v16.15.1 is already installed.
7:18:39 PM: Now using node v16.15.1 (npm v8.11.0)
7:18:39 PM: Started restoring cached build plugins
7:18:39 PM: Finished restoring cached build plugins
7:18:39 PM: Attempting ruby version 2.7.2, read from environment
7:18:40 PM: Using ruby version 2.7.2
7:18:40 PM: Using PHP version 8.0
7:18:40 PM: Started restoring cached yarn cache
7:18:40 PM: Finished restoring cached yarn cache
7:18:41 PM: No yarn workspaces detected
7:18:41 PM: Started restoring cached node modules
7:18:41 PM: Finished restoring cached node modules
7:18:41 PM: Installing NPM modules using Yarn version 1.22.10
7:18:41 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
7:18:41 PM: npm WARN config location in the cache, and they are managed by
7:18:41 PM: npm WARN config [`cacache`](http://npm.im/cacache).
7:18:42 PM: yarn install v1.22.10
7:18:42 PM: [1/4] Resolving packages...
7:18:42 PM: [2/4] Fetching packages...
7:19:19 PM: info fsevents#2.3.2: The platform "linux" is incompatible with this module.
7:19:19 PM: info "fsevents#2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: info #lmdb/lmdb-darwin-arm64#2.5.2: The platform "linux" is incompatible with this module.
7:19:19 PM: info "#lmdb/lmdb-darwin-arm64#2.5.2" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: info #lmdb/lmdb-darwin-arm64#2.5.2: The CPU architecture "x64" is incompatible with this module.
7:19:19 PM: info #lmdb/lmdb-darwin-x64#2.5.2: The platform "linux" is incompatible with this module.
7:19:19 PM: info "#lmdb/lmdb-darwin-x64#2.5.2" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: info #lmdb/lmdb-linux-arm#2.5.2: The CPU architecture "x64" is incompatible with this module.
7:19:19 PM: info "#lmdb/lmdb-linux-arm#2.5.2" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: info #lmdb/lmdb-linux-arm64#2.5.2: The CPU architecture "x64" is incompatible with this module.
7:19:19 PM: info "#lmdb/lmdb-linux-arm64#2.5.2" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: info #lmdb/lmdb-win32-x64#2.5.2: The platform "linux" is incompatible with this module.
7:19:19 PM: info "#lmdb/lmdb-win32-x64#2.5.2" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: info lmdb-darwin-arm64#2.3.10: The platform "linux" is incompatible with this module.
7:19:19 PM: info "lmdb-darwin-arm64#2.3.10" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: info lmdb-darwin-arm64#2.3.10: The CPU architecture "x64" is incompatible with this module.
7:19:19 PM: info lmdb-darwin-x64#2.3.10: The platform "linux" is incompatible with this module.
7:19:19 PM: info "lmdb-darwin-x64#2.3.10" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: info lmdb-linux-arm#2.3.10: The CPU architecture "x64" is incompatible with this module.
7:19:19 PM: info "lmdb-linux-arm#2.3.10" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: info lmdb-linux-arm64#2.3.10: The CPU architecture "x64" is incompatible with this module.
7:19:19 PM: info "lmdb-linux-arm64#2.3.10" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: info lmdb-win32-x64#2.3.10: The platform "linux" is incompatible with this module.
7:19:19 PM: info "lmdb-win32-x64#2.3.10" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: info #msgpackr-extract/msgpackr-extract-darwin-arm64#2.0.2: The platform "linux" is incompatible with this module.
7:19:19 PM: info "#msgpackr-extract/msgpackr-extract-darwin-arm64#2.0.2" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: info #msgpackr-extract/msgpackr-extract-darwin-arm64#2.0.2: The CPU architecture "x64" is incompatible with this module.
7:19:19 PM: info #msgpackr-extract/msgpackr-extract-darwin-x64#2.0.2: The platform "linux" is incompatible with this module.
7:19:19 PM: info "#msgpackr-extract/msgpackr-extract-darwin-x64#2.0.2" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: info #msgpackr-extract/msgpackr-extract-linux-arm#2.0.2: The CPU architecture "x64" is incompatible with this module.
7:19:19 PM: info "#msgpackr-extract/msgpackr-extract-linux-arm#2.0.2" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: info #msgpackr-extract/msgpackr-extract-linux-arm64#2.0.2: The CPU architecture "x64" is incompatible with this module.
7:19:19 PM: info "#msgpackr-extract/msgpackr-extract-linux-arm64#2.0.2" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: info #msgpackr-extract/msgpackr-extract-win32-x64#2.0.2: The platform "linux" is incompatible with this module.
7:19:19 PM: info "#msgpackr-extract/msgpackr-extract-win32-x64#2.0.2" is an optional dependency and failed compatibility check. Excluding it from installation.
7:19:19 PM: [3/4] Linking dependencies...
7:19:19 PM: warning "#emotion/react > #emotion/babel-plugin#11.9.2" has unmet peer dependency "#babel/core#^7.0.0".
7:19:19 PM: warning "#emotion/react > #emotion/babel-plugin > #babel/plugin-syntax-jsx#7.18.6" has unmet peer dependency "#babel/core#^7.0.0-0".
7:19:19 PM: warning "gatsby > eslint-config-react-app#6.0.0" has unmet peer dependency "babel-eslint#^10.0.0".
7:19:19 PM: warning "gatsby > #typescript-eslint/eslint-plugin > tsutils#3.21.0" has unmet peer dependency "typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
7:19:19 PM: warning "gatsby > gatsby-parcel-config > #gatsbyjs/parcel-namer-relative-to-cwd#1.2.0" has incorrect peer dependency "#parcel/namer-default#2.5.0".
7:19:19 PM: warning "gatsby > react-dev-utils > fork-ts-checker-webpack-plugin#6.5.2" has unmet peer dependency "typescript#>= 2.7".
7:19:19 PM: warning "gatsby > eslint-plugin-graphql > graphql-config > #endemolshinegroup/cosmiconfig-typescript-loader > ts-node#9.1.1" has unmet peer dependency "typescript#>=2.7".
7:19:19 PM: warning " > gatsby-plugin-image#2.17.0" has unmet peer dependency "#babel/core#^7.12.3".
7:19:19 PM: warning "gatsby-plugin-netlify > webpack-assets-manifest#5.1.0" has unmet peer dependency "webpack#^5.2.0".
7:19:19 PM: warning " > gatsby-source-contentful#7.15.0" has unmet peer dependency "sharp#^0.30.1".
7:19:19 PM: warning " > react-share#4.4.0" has incorrect peer dependency "react#^16.3.0 || ^17".
7:19:19 PM: warning " > styled-components#5.3.5" has unmet peer dependency "react-is#>= 16.8.0".
7:19:41 PM: [4/4] Building fresh packages...
7:19:46 PM: Done in 64.31s.
7:19:46 PM: NPM modules installed using Yarn
7:19:46 PM: Started restoring cached go cache
7:19:46 PM: Finished restoring cached go cache
7:19:46 PM: Installing Go version 1.17 (requested 1.17)
7:19:52 PM: unset GOOS;
7:19:52 PM: unset GOARCH;
7:19:52 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.17.linux.amd64';
7:19:52 PM: export PATH="/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}";
7:19:52 PM: go version >&2;
7:19:52 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.17.linux.amd64.env"
7:19:52 PM: go version go1.17 linux/amd64
7:19:52 PM: Installing missing commands
7:19:52 PM: Verify run directory
7:19:53 PM: ​
7:19:53 PM: ────────────────────────────────────────────────────────────────
7:19:53 PM: Netlify Build
7:19:53 PM: ────────────────────────────────────────────────────────────────
7:19:53 PM: ​
7:19:53 PM: ❯ Version
7:19:53 PM: #netlify/build 27.3.3
7:19:53 PM: ​
7:19:53 PM: ❯ Flags
7:19:53 PM: baseRelDir: true
7:19:53 PM: buildId: 62c6eb389ed7b80008bd0cda
7:19:53 PM: deployId: 62c6eb389ed7b80008bd0cdc
7:19:53 PM: ​
7:19:53 PM: ❯ Current directory
7:19:53 PM: /opt/build/repo
7:19:53 PM: ​
7:19:53 PM: ❯ Config file
7:19:53 PM: No config file was defined: using default values.
7:19:53 PM: ​
7:19:53 PM: ❯ Context
7:19:53 PM: production
7:19:53 PM: ​
7:19:53 PM: ❯ Installing plugins
7:19:53 PM: - #netlify/plugin-gatsby#3.2.4
7:20:05 PM: ​
7:20:05 PM: ❯ Loading plugins
7:20:05 PM: - #netlify/plugin-gatsby#3.2.4 from Netlify app
7:20:07 PM: ​
7:20:07 PM: ────────────────────────────────────────────────────────────────
7:20:07 PM: 1. #netlify/plugin-gatsby (onPreBuild event)
7:20:07 PM: ────────────────────────────────────────────────────────────────
7:20:07 PM: ​
7:20:07 PM: No Gatsby cache found. Building fresh.
7:20:07 PM: ​
7:20:07 PM: (#netlify/plugin-gatsby onPreBuild completed in 18ms)
7:20:07 PM: ​
7:20:07 PM: ────────────────────────────────────────────────────────────────
7:20:07 PM: 2. Build command from Netlify app
7:20:07 PM: ────────────────────────────────────────────────────────────────
7:20:07 PM: ​
7:20:07 PM: $ yarn build
7:20:07 PM: yarn run v1.22.10
7:20:07 PM: $ gatsby build
7:20:10 PM: success compile gatsby files - 0.931s
7:20:10 PM: success load gatsby config - 0.025s
7:20:11 PM: success load plugins - 0.748s
7:20:11 PM: success onPreInit - 0.006s
7:20:11 PM: success initialize cache - 0.066s
7:20:11 PM: success copy gatsby files - 0.112s
7:20:11 PM: success Compiling Gatsby Functions - 0.200s
7:20:11 PM: success onPreBootstrap - 0.210s
7:20:11 PM: success createSchemaCustomization - 0.113s
7:20:12 PM: success Contentful: Sync all items - 0.166s - 47/47 283.19/s
7:20:12 PM: success Contentful: Fetch data - 0.442s
7:20:12 PM: info Contentful: 24 new entries
7:20:12 PM: info Contentful: 9 updated entries
7:20:12 PM: info Contentful: 0 deleted entries
7:20:12 PM: info Contentful: 0 cached entries
7:20:12 PM: info Contentful: 14 new assets
7:20:12 PM: info Contentful: 0 updated assets
7:20:12 PM: info Contentful: 0 cached assets
7:20:12 PM: info Contentful: 0 deleted assets
7:20:12 PM: info Creating 1 Contentful Home nodes
7:20:12 PM: info Creating 3 Contentful Teaser Component nodes
7:20:12 PM: info Creating 2 Contentful Article Template nodes
7:20:12 PM: info Creating 1 Contentful FAQ nodes
7:20:12 PM: info Creating 3 Contentful FAQ Question Template nodes
7:20:12 PM: info Creating 4 Contentful FAQ Question Answer Section nodes
7:20:12 PM: info Creating 1 Contentful App Status Page nodes
7:20:12 PM: info Creating 6 Contentful Services Status nodes
7:20:12 PM: info Creating 1 Contentful Footer nodes
7:20:12 PM: info Creating 1 Contentful Footer Queries Section nodes
7:20:12 PM: info Creating 1 Contentful Our Best Feature Section nodes
7:20:12 PM: info Creating 6 Contentful Feature nodes
7:20:12 PM: info Creating 1 Contentful Topics nodes
7:20:12 PM: info Creating 1 Contentful Stay In Touch nodes
7:20:12 PM: info Creating 1 Contentful Single Topic nodes
7:20:12 PM: info Creating 14 Contentful asset nodes
7:20:12 PM: success Contentful: Create nodes - 0.141s
7:20:12 PM: success Contentful: Process data - 0.173s
7:20:12 PM: success Checking for changed pages - 0.000s
7:20:12 PM: success source and transform nodes - 0.807s
7:20:13 PM: info Writing GraphQL type definitions to /opt/build/repo/.cache/schema.gql
7:20:15 PM: success building schema - 2.997s
7:20:15 PM: success createPages - 0.084s
7:20:15 PM: success createPagesStatefully - 0.203s
7:20:15 PM: info Total nodes: 107, SitePage nodes: 7 (use --verbose for breakdown)
7:20:15 PM: success Checking for changed pages - 0.000s
7:20:15 PM: success onPreExtractQueries - 0.000s
7:20:21 PM: success extract queries from components - 5.518s
7:20:21 PM: success write out redirect data - 0.002s
7:20:21 PM: success onPostBootstrap - 0.001s
7:20:21 PM: info bootstrap finished - 14.241s
7:20:21 PM: success write out requires - 0.005s
7:20:58 PM: success Building production JavaScript and CSS bundles - 36.481s
7:21:12 PM: <w> [webpack.cache.PackFileCacheStrategy] Skipped not serializable cache item 'mini-css-extract-plugin /opt/build/repo/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[10].oneOf[1].use[1]!/opt/build/repo/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[10].oneOf[1].use[2]!/opt/build/repo/src/assets/css/layout.css|0|Compilation/modules|/opt/build/repo/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[10].oneOf[1].use[1]!/opt/build/repo/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[10].oneOf[1].use[2]!/opt/build/repo/src/assets/css/layout.css': No serializer registered for Warning
7:21:12 PM: <w> while serializing webpack/lib/cache/PackFileCacheStrategy.PackContentItems -> webpack/lib/NormalModule -> Array { 1 items } -> webpack/lib/ModuleWarning -> Warning
7:21:14 PM: success Building HTML renderer - 16.204s
7:21:14 PM: success Execute page configs - 0.022s
7:21:14 PM: success Caching Webpack compilations - 0.000s
7:21:23 PM: success run queries in workers - 9.090s - 8/8 0.88/s
7:21:23 PM: success Merge worker state - 0.001s
7:21:23 PM: success Rewriting compilation hashes - 0.004s
7:21:23 PM: success Writing page-data.json files to public directory - 0.004s - 7/7 1745.23/s
7:54:32 PM: Build exceeded maximum allowed runtime
Just like the error says, the build took more than the maximum allowed time. Netlify allows 15 min as the default time for builds to finish. Once you're over this limit, the builds would most likely fail.
You can contact Netlify Support to get the limit raised. It's usually not chargeable.

Netlify deploy failing with Create React App / CRACO / yarn build:

I have built a simple app using Create React App, Tailwind and CRACO (https://github.com/gsoft-inc/craco), following the instructions here: https://tailwindcss.com/docs/guides/create-react-app
The app also uses Typescript if thats relevant.
However I keep getting build errors when deploying to Netlify - Failed to load config "react-app" to extend from.
I am using the default command yarn build but have also tried with npm run build and CI=' ' npm run build
I have also tried updating the eslint deps based on other advice using the command yarn add eslint-config-react-app -D but still no luck.
Here is the deploy log:
12:19:16 PM: Build ready to start
12:19:18 PM: build-image version: be42e453d6c8f171cc2f654acc29c0a8b60e6d93
12:19:18 PM: build-image tag: v3.7.1
12:19:18 PM: buildbot version: 449a896d650f66a48d6924703527235917156153
12:19:18 PM: Fetching cached dependencies
12:19:18 PM: Failed to fetch cache, continuing with build
12:19:18 PM: Starting to prepare the repo for build
12:19:18 PM: No cached dependencies found. Cloning fresh repo
12:19:18 PM: git clone https://github.com/awenine/gifGrid
12:19:19 PM: Preparing Git Reference refs/heads/master
12:19:20 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'build' versus 'build/' in the Netlify UI
12:19:21 PM: Starting build script
12:19:21 PM: Installing dependencies
12:19:21 PM: Python version set to 2.7
12:19:22 PM: v12.18.0 is already installed.
12:19:23 PM: Now using node v12.18.0 (npm v6.14.4)
12:19:23 PM: Started restoring cached build plugins
12:19:23 PM: Finished restoring cached build plugins
12:19:23 PM: Attempting ruby version 2.7.1, read from environment
12:19:24 PM: Using ruby version 2.7.1
12:19:25 PM: Using PHP version 5.6
12:19:25 PM: Started restoring cached yarn cache
12:19:25 PM: Finished restoring cached yarn cache
12:19:25 PM: Installing yarn at version 1.22.4
12:19:25 PM: Installing Yarn!
12:19:25 PM: > Downloading tarball...
12:19:25 PM: [1/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz --> /tmp/yarn.tar.gz.feJPvA3wGo
12:19:25 PM: % Total % Received % Xferd Average Speed Time Time Time Current
12:19:25 PM: Dload Upload Total Spent Left Speed
12:19:25 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
12:19:25 PM: 100 79 100 79 0 0 365 0 --:--:-- --:--:-- --:--:-- 365
12:19:25 PM: 100 93 100 93 0 0 105 0 --:--:-- --:--:-- --:--:-- 105
12:19:26 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
12:19:26 PM: 100 625 100 625 0 0 547 0 0:00:01 0:00:01 --:--:-- 4032
12:19:26 PM: 100 1215k 100 1215k 0 0 799k 0 0:00:01 0:00:01 --:--:-- 799k
12:19:26 PM: [2/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz.asc --> /tmp/yarn.tar.gz.feJPvA3wGo.asc
12:19:26 PM: 100 83 100 83 0 0 951 0 --:--:-- --:--:-- --:--:-- 951
12:19:26 PM: 100 97 100 97 0 0 495 0 --:--:-- --:--:-- --:--:-- 495
12:19:26 PM: 100 629 100 629 0 0 2784 0 --:--:-- --:--:-- --:--:-- 2784
12:19:26 PM: 100 1028 100 1028 0 0 4315 0 --:--:-- --:--:-- --:--:-- 4315
12:19:26 PM: > Verifying integrity...
12:19:26 PM: gpg: Signature made Mon 09 Mar 2020 03:52:13 PM UTC using RSA key ID 69475BAA
12:19:26 PM: gpg: Good signature from "Yarn Packaging <yarn#dan.cx>"
12:19:26 PM: gpg: WARNING: This key is not certified with a trusted signature!
12:19:26 PM: gpg: There is no indication that the signature belongs to the owner.
12:19:26 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310
12:19:26 PM: Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA
12:19:26 PM: > GPG signature looks good
12:19:26 PM: > Extracting to ~/.yarn...
12:19:26 PM: > Adding to $PATH...
12:19:27 PM: > Successfully installed Yarn 1.22.4! Please open another terminal where the `yarn` command will now be available.
12:19:27 PM: Started restoring cached node modules
12:19:27 PM: Finished restoring cached node modules
12:19:27 PM: Installing NPM modules using Yarn version 1.22.4
12:19:28 PM: yarn install v1.22.4
12:19:28 PM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
12:19:28 PM: [1/4] Resolving packages...
12:19:29 PM: [2/4] Fetching packages...
12:19:54 PM: info fsevents#2.3.2: The platform "linux" is incompatible with this module.
12:19:54 PM: info "fsevents#2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
12:19:54 PM: info fsevents#1.2.13: The platform "linux" is incompatible with this module.
12:19:54 PM: info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
12:19:54 PM: [3/4] Linking dependencies...
12:19:54 PM: warning " > #testing-library/user-event#12.8.3" has unmet peer dependency "#testing-library/dom#>=7.21.4".
12:20:09 PM: [4/4] Building fresh packages...
12:20:10 PM: success Saved lockfile.
12:20:10 PM: Done in 42.19s.
12:20:10 PM: NPM modules installed using Yarn
12:20:10 PM: Started restoring cached go cache
12:20:10 PM: Finished restoring cached go cache
12:20:10 PM: go version go1.14.4 linux/amd64
12:20:10 PM: go version go1.14.4 linux/amd64
12:20:10 PM: Installing missing commands
12:20:10 PM: Verify run directory
12:20:12 PM: ​
12:20:12 PM: ────────────────────────────────────────────────────────────────
12:20:12 PM: Netlify Build
12:20:12 PM: ────────────────────────────────────────────────────────────────
12:20:12 PM: ​
12:20:12 PM: ❯ Version
12:20:12 PM: #netlify/build 10.2.3
12:20:12 PM: ​
12:20:12 PM: ❯ Flags
12:20:12 PM: deployId: 606d95348e139e000844b80d
12:20:12 PM: ​
12:20:12 PM: ❯ Current directory
12:20:12 PM: /opt/build/repo
12:20:12 PM: ​
12:20:12 PM: ❯ Config file
12:20:12 PM: No config file was defined: using default values.
12:20:12 PM: ​
12:20:12 PM: ❯ Context
12:20:12 PM: production
12:20:12 PM: ​
12:20:12 PM: ────────────────────────────────────────────────────────────────
12:20:12 PM: 1. Build command from Netlify app
12:20:12 PM: ────────────────────────────────────────────────────────────────
12:20:12 PM: ​
12:20:12 PM: $ yarn build
12:20:12 PM: yarn run v1.22.4
12:20:12 PM: $ craco build
12:20:15 PM: Creating an optimized production build...
12:20:33 PM: Failed to compile.
12:20:33 PM:
12:20:33 PM: Failed to load config "react-app" to extend from.
12:20:33 PM: Referenced from: /opt/build/repo/package.json
12:20:33 PM: error Command failed with exit code 1.
12:20:33 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
12:20:33 PM: ​
12:20:33 PM: ────────────────────────────────────────────────────────────────
12:20:33 PM: "build.command" failed
12:20:33 PM: ────────────────────────────────────────────────────────────────
12:20:33 PM: ​
12:20:33 PM: Error message
12:20:33 PM: Command failed with exit code 1: yarn build
12:20:33 PM: ​
12:20:33 PM: Error location
12:20:33 PM: In Build command from Netlify app:
12:20:33 PM: yarn build
12:20:33 PM: ​
12:20:33 PM: Resolved config
12:20:33 PM: build:
12:20:33 PM: command: yarn build
12:20:33 PM: commandOrigin: ui
12:20:33 PM: environment:
12:20:33 PM: - REACT_APP_GIPHY_API_KEY
12:20:33 PM: publish: /opt/build/repo/build
12:20:34 PM: Caching artifacts
12:20:34 PM: Started saving node modules
12:20:34 PM: Finished saving node modules
12:20:34 PM: Started saving build plugins
12:20:34 PM: Finished saving build plugins
12:20:34 PM: Started saving yarn cache
12:20:34 PM: Finished saving yarn cache
12:20:34 PM: Started saving pip cache
12:20:34 PM: Finished saving pip cache
12:20:34 PM: Started saving emacs cask dependencies
12:20:34 PM: Finished saving emacs cask dependencies
12:20:34 PM: Started saving maven dependencies
12:20:34 PM: Finished saving maven dependencies
12:20:34 PM: Started saving boot dependencies
12:20:34 PM: Finished saving boot dependencies
12:20:34 PM: Started saving rust rustup cache
12:20:34 PM: Finished saving rust rustup cache
12:20:34 PM: Started saving go dependencies
12:20:34 PM: Finished saving go dependencies
12:20:37 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
12:20:37 PM: Failing build: Failed to build site
12:20:37 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
12:20:37 PM: Finished processing build request in 1m18.82853936s
and here is my package.json:
{
"name": "gifgrid",
"version": "0.1.0",
"private": true,
"dependencies": {
"#craco/craco": "^6.1.1",
"#testing-library/jest-dom": "^5.11.4",
"#testing-library/react": "^11.1.0",
"#testing-library/user-event": "^12.1.10",
"#types/jest": "^26.0.15",
"#types/node": "^12.0.0",
"#types/react-dom": "^17.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"react-tooltip": "^4.2.17",
"typescript": "^4.1.2",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
"eject": "react-scripts eject",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --quiet"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"#tailwindcss/postcss7-compat": "^2.0.4",
"#types/react": "^17.0.3",
"#typescript-eslint/eslint-plugin": "^4.20.0",
"#typescript-eslint/parser": "^4.20.0",
"autoprefixer": "^9.8.6",
"eslint": "^7.23.0",
"eslint-config-prettier": "^8.1.0",
"postcss": "^7.0.35",
"tailwindcss": "npm:#tailwindcss/postcss7-compat#^2.0.4"
}
}
Any idea whats going wrong? To be honest im not really sure about the interaction between yarn and npm, I do know that I created and successfully deployed a similar app to Netlify recently where the main build difference was this new one uses Tailwind and CRACO.
Much appreciated!
I had this problem today and did npm install eslint-config-react-app like on github is recommended. After that console adviced me to install #babel/core and typescript, so i installed them by npm install #babel/core and npm install typescript
npm WARN #babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining#7.13.12 requires a peer of #babel/core#^7.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils#3.21.0 requires a peer of typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
After that I tried to deploy but it failed againt because I didn't have babel-eslint, so I did npm install babel-eslint and then it worked.
(before i also did npm update & npm cache clean --force like here on stackoverflow is recommended, but I'm not sure if it helped)
May be that will help!
UPDATE: May be that happens when eslint modules are not in devDependencies, but in dependencies. I hope somebody with good knowledges will approve or refute this assumption

Problems with the integration with GitHub (gulp) Netlify

An error occurs when you add a site from a GitHub repository and deploy it:
6:36:32 PM: Build ready to start
6:36:35 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
6:36:35 PM: build-image tag: v3.3.2
6:36:35 PM: buildbot version: ef8d0929ed0baabafd8bbb7d0b021e1fc24180c0
6:36:35 PM: Fetching cached dependencies
6:36:35 PM: Failed to fetch cache, continuing with build
6:36:35 PM: Starting to prepare the repo for build
6:36:36 PM: No cached dependencies found. Cloning fresh repo
6:36:36 PM: git clone https://github.com/Thr0TT1e/huddle_landing_page
6:36:37 PM: Preparing Git Reference refs/heads/master
6:36:37 PM: Found netlify.toml. Overriding site configuration
6:36:37 PM: Starting build script
6:36:37 PM: Installing dependencies
6:36:39 PM: Downloading and installing node v10.16.2...
6:36:40 PM: Downloading https://nodejs.org/dist/v10.16.2/node-v10.16.2-linux-x64.tar.xz...
6:36:40 PM:
#####
6:36:40 PM: 7.8%
6:36:40 PM:
###############################################################
6:36:40 PM: ######### 100.0%
6:36:40 PM: Computing checksum with sha256sum
6:36:40 PM: Checksums matched!
6:36:43 PM: Now using node v10.16.2 (npm v6.9.0)
6:36:44 PM: Attempting ruby version 2.6.2, read from environment
6:36:46 PM: Using ruby version 2.6.2
6:36:47 PM: Using PHP version 5.6
6:36:47 PM: Started restoring cached node modules
6:36:47 PM: Finished restoring cached node modules
6:36:47 PM: Installing NPM modules using NPM version 6.9.0
6:36:49 PM: npm
6:36:49 PM: WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
6:36:53 PM: npm WARN deprecated lodash.createcallback#2.4.4: This package is discontinued. Use lodash.iteratee#^4.0.0.
6:37:18 PM: > node-sass#4.12.0 install /opt/build/repo/node_modules/node-sass
6:37:18 PM: > node scripts/install.js
6:37:19 PM: Downloading binary from https://github.com/sass/node-sass/releases/download/v4.12.0/linux-x64-64_binding.node
6:37:21 PM: Download complete
6:37:21 PM: Binary saved to /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node
6:37:21 PM: Caching binary to /opt/buildhome/.npm/node-sass/4.12.0/linux-x64-64_binding.node
6:37:21 PM: > node-sass#4.12.0 postinstall /opt/build/repo/node_modules/node-sass
6:37:21 PM: > node scripts/build.js
6:37:22 PM: Binary found at /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node
6:37:22 PM: Testing binary
6:37:22 PM: Binary is fine
6:37:22 PM: > gifsicle#4.0.1 postinstall /opt/build/repo/node_modules/gifsicle
6:37:22 PM: > node lib/install.js
6:37:23 PM: ✔ gifsicle pre-build test passed successfully
6:37:23 PM: > jpegtran-bin#4.0.0 postinstall /opt/build/repo/node_modules/jpegtran-bin
6:37:23 PM: > node lib/install.js
6:37:24 PM: ✔ jpegtran pre-build test passed successfully
6:37:24 PM: > optipng-bin#5.1.0 postinstall /opt/build/repo/node_modules/optipng-bin
6:37:24 PM: > node lib/install.js
6:37:24 PM: ✔ optipng pre-build test passed successfully
6:37:25 PM: npm
6:37:25 PM: notice created a lockfile as package-lock.json. You should commit this file.
6:37:25 PM: npm WARN
6:37:25 PM: huddle-landing-page#0.0.1 No repository field.
6:37:25 PM: npm WARN optional
6:37:25 PM: SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/fsevents):
6:37:25 PM: npm WARN
6:37:25 PM: notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
6:37:25 PM: added 925 packages from 552 contributors and audited 14495 packages in 37.17s
6:37:25 PM: found 0 vulnerabilities
6:37:26 PM: NPM modules installed
6:37:26 PM: Started restoring cached go cache
6:37:26 PM: Finished restoring cached go cache
6:37:26 PM: unset GOOS;
6:37:26 PM: unset GOARCH;
6:37:26 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
6:37:26 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
6:37:26 PM: go version >&2;
6:37:26 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
6:37:26 PM: go version go1.12 linux/amd64
6:37:26 PM: Installing missing commands
6:37:26 PM: Verify run directory
6:37:26 PM: Executing user command: gulp build
6:37:28 PM: [15:37:28]
6:37:28 PM: Using gulpfile /opt/build/repo/gulpfile.js
6:37:28 PM: [15:37:28]
6:37:28 PM: Task never defined: build
6:37:28 PM: [15:37:28]
6:37:28 PM: To list available tasks, try running: gulp --tasks
6:37:28 PM: Skipping functions preparation step: no functions directory set
6:37:28 PM: Caching artifacts
6:37:28 PM: Started saving node modules
6:37:28 PM: Finished saving node modules
6:37:28 PM: Started saving pip cache
6:37:28 PM: Finished saving pip cache
6:37:28 PM: Started saving emacs cask dependencies
6:37:28 PM: Finished saving emacs cask dependencies
6:37:28 PM: Started saving maven dependencies
6:37:28 PM: Finished saving maven dependencies
6:37:28 PM: Started saving boot dependencies
6:37:28 PM: Finished saving boot dependencies
6:37:28 PM: Started saving go dependencies
6:37:28 PM: Finished saving go dependencies
6:37:38 PM: Error running command: Build script returned non-zero exit code: 1
6:37:38 PM: Failing build: Failed to build site
6:37:38 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
6:37:38 PM: Finished processing build request in 1m3.374187994s
netlify.toml
# global context
[build]
publish = "dist"
command = "gulp build"
# build a preview (optional)
[context.deploy-preview]
command = "gulp build-preview"
# build a branch with debug (optional)
[context.branch-deploy]
command = "gulp build-debug"
gulpfile.js - https://github.com/Thr0TT1e/huddle_landing_page/blob/master/gulpfile.js
What settings still need to properly build the project on Netlify? The project was built using gulp, I do not have a special task for the Assembly.
I am not sure if this is the same issue, but when I was trying to deploy a repository that had the gulpfile in it, I kept getting build errors, 404 messages, or sites with no css on them.
If you are using gulp to compile node_modules like I was by using the gulpfile.js running the gulp command, then what you need to do is just upload the app folder files into a repository and deploy that repository.
https://themesberg.com/blog/tutorial/gulp-4-bootstrap-sass-browsersync
I followed this site to get the gulp setup to use SASS and bootstrap.
This has you set up an app folder that will house the compiled gulp code. It is the files and folders inside the app folder that you will upload to a repository and deploy on netlify.
Here is my repositories for an example:
https://github.com/alexgant/CITPT217-redesign-weiner-works <-- repository housing all code including gulpfile.js
https://github.com/alexgant/weinerworks <-- repository housing only the app folders from the repository above.
https://weinerworks-alexis-gantz.netlify.app/ <--here is my working Netlify site using the 2nd repository listed.
Try adding a netlify.toml file in the root of your project. Inside the file add a route to point back to the root file. Something like:
[[redirects]]
from = "/"
to = "/index.html"
status = 200

Error in building a Hugo site on netlify because of exit error status 127

I am building a static site using Hugo, netlify, and github.
But I am getting the error on the last line with exit code 127 about the building site script.
What is this script and how do i fix this.
LINK -Github repo
I am a very beginner.
Thanks in advance
5:10:09 PM: Build ready to start
5:10:10 PM: build-image version: 42bca793ccd33055023c56c4ca8510463a56d317
5:10:10 PM: buildbot version: 15854c92f1b74f9c77ad951b5536193c76eff25e
5:10:11 PM: Fetching cached dependencies
5:10:11 PM: Starting to download cache of 16.7MB
5:10:11 PM: Finished downloading cache in 209.623278ms
5:10:11 PM: Starting to extract cache
5:10:11 PM: Finished extracting cache in 184.94328ms
5:10:11 PM: Finished fetching cache in 452.033931ms
5:10:11 PM: Starting to prepare the repo for build
5:10:11 PM: Preparing Git Reference refs/heads/master
5:10:12 PM: Starting build script
5:10:12 PM: Installing dependencies
5:10:13 PM: Downloading and installing node v8.12.0...
5:10:13 PM: Downloading https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.xz...
5:10:14 PM: 0.9%
5:10:14 PM:
#####################
5:10:14 PM: 30.3%
5:10:14 PM:
#################################
5:10:14 PM: ####################################### 100.0%
5:10:14 PM: Computing checksum with sha256sum
5:10:14 PM: Checksums matched!
5:10:16 PM: Now using node v8.12.0 (npm v6.4.1)
5:10:17 PM: Attempting ruby version 2.3.6, read from environment
5:10:18 PM: Using ruby version 2.3.6
5:10:18 PM: Using PHP version 5.6
5:10:18 PM: Installing Hugo 0.41
5:10:19 PM: Started restoring cached go cache
5:10:19 PM: Finished restoring cached go cache
5:10:19 PM: unset GOOS;
5:10:19 PM: unset GOARCH;
5:10:19 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';
5:10:19 PM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
5:10:19 PM: go version >&2;
5:10:20 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';
5:10:20 PM: go version go1.10 linux/amd64
5:10:20 PM: Installing missing commands
5:10:20 PM: Verify run directory
5:10:20 PM: Executing user command: hugo_0.41
5:10:20 PM: /usr/local/bin/build: line 32: hugo_0.41: command not found
5:10:20 PM: Caching artifacts
5:10:20 PM: Started saving pip cache
5:10:20 PM: Finished saving pip cache
5:10:20 PM: Started saving emacs cask dependencies
5:10:20 PM: Finished saving emacs cask dependencies
5:10:20 PM: Started saving maven dependencies
5:10:20 PM: Finished saving maven dependencies
5:10:20 PM: Started saving boot dependencies
5:10:20 PM: Finished saving boot dependencies
5:10:20 PM: Started saving go dependencies
5:10:20 PM: Finished saving go dependencies
5:10:20 PM: Cached node version v8.12.0
5:10:20 PM: Error running command: Build script returned non-zero exit code: 127
5:10:20 PM: Failing build: Failed to build site
5:10:20 PM: failed during stage 'building site': Build script returned non-zero exit code: 127
5:10:20 PM: Finished processing build request in 9.957599589s
Netlify is using the command hugo_0.41 which is incorrect to build Hugo
Executing user command: hugo_0.41
When there is a non-zero exit code, your site build will fail and will not deploy.
Error running command: Build script returned non-zero exit code: 127
Solution
Fix this by running the correct command for a production build hugo. Also setup the Hugo version to your target version, which looks like it is version 0.41
The easiest way to control this from your repository is to create a netlify.toml file in the root of your repository.
netlify.toml
[build]
command = "hugo"
publish = "public"
[build.environment]
HUGO_VERSION = "0.41"
Note: The values in the netlify.toml can be set in the app.netlify.com online admin also, but netlify.toml will override these values and can also be used for more advanced settings later. You could also test out a different version of Hugo by changing the version number.