App working fine on localhost but doesn't loads on netlify? - reactjs

i am trying to deploy it now, the app works great on localhost, no problems at all but when i deploy it to netlify from github it crashes by giving me these errors in developers console.
init # include.preload.js:442
(index):1 Mixed Content: The page at 'https://5cfc2538a4fc311e18e72538--brave-poincare-d969b9.netlify.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://video-react.js.org/assets/video-react.css'. This request has been blocked; the content must be served over HTTPS.
2.0370c799.chunk.js:1 Uncaught SyntaxError: Unexpected token <
main.dbd098f2.chunk.js:1 Uncaught SyntaxError: Unexpected token <
include.preload.js:442 [Deprecation] Element.createShadowRoot is deprecated and will be removed in M73, around March 2019. Please use Element.attachShadow instead. See https://www.chromestatus.com/features/4507242028072960 for more details.
init # include.preload.js:442
include.preload.js:442 [Deprecation] Element.createShadowRoot is deprecated and will be removed in M73, around March 2019. Please use Element.attachShadow instead. See https://www.chromestatus.com/features/4507242028072960 for more details.
init # include.preload.js:442
manifest.json:1 Manifest: Line: 1, column: 1, Unexpected token.
(index):1 Mixed Content: The page at 'https://5cfc2538a4fc311e18e72538--brave-poincare-d969b9.netlify.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://video-react.js.org/assets/video-react.css'. This request has been blocked; the content must be served over HTTPS.
it was not being able to install node-pre-gyp module before, but i fixed it but now it gets deployed but doesn't work
complete log of netlify deployement:
5:14:32 PM: Build ready to start
5:14:34 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
5:14:34 PM: build-image tag: v3.3.2
5:14:34 PM: buildbot version: 75cd99f62ada9e21edea53208e8baf0eab85a045
5:14:35 PM: Fetching cached dependencies
5:14:35 PM: Failed to fetch cache, continuing with build
5:14:35 PM: Starting to prepare the repo for build
5:14:35 PM: No cached dependencies found. Cloning fresh repo
5:14:35 PM: git clone https://github.com/Phyxable/app-jun-07
5:14:50 PM: Preparing Git Reference refs/heads/master
5:14:51 PM: Starting build script
5:14:51 PM: Installing dependencies
5:14:53 PM: Downloading and installing node v10.16.0...
5:14:53 PM: Downloading https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-x64.tar.xz...
5:14:53 PM:
#######
5:14:53 PM: 11.0%
5:14:53 PM:
###############################################################
5:14:53 PM: ### 91.8%
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: ################
5:14:54 PM: ########################################## 100.0%
5:14:54 PM: Computing checksum with sha256sum
5:14:54 PM: Checksums matched!
5:14:56 PM: Now using node v10.16.0 (npm v6.9.0)
5:14:57 PM: Attempting ruby version 2.6.2, read from environment
5:14:58 PM: Using ruby version 2.6.2
5:14:58 PM: Using PHP version 5.6
5:14:58 PM: Started restoring cached node modules
5:15:00 PM: Finished restoring cached node modules
5:15:00 PM: Installing NPM modules using NPM version 6.9.0
5:15:33 PM: > grpc#1.20.3 install /opt/build/repo/node_modules/grpc
5:15:33 PM: > node-pre-gyp install --fallback-to-build --library=static_library
5:15:33 PM: node-pre-gyp
5:15:33 PM: WARN
5:15:33 PM: Using request for node-pre-gyp https download
5:15:34 PM: [grpc] Success: "/opt/build/repo/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" is installed via remote
5:15:34 PM: > core-js-pure#3.1.3 postinstall /opt/build/repo/node_modules/core-js-pure
5:15:34 PM: > node scripts/postinstall || echo "ignore"
5:15:34 PM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
5:15:34 PM: The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
5:15:34 PM: > https://opencollective.com/core-js
5:15:34 PM: > https://www.patreon.com/zloirock
5:15:34 PM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
5:15:34 PM: > protobufjs#6.8.8 postinstall /opt/build/repo/node_modules/protobufjs
5:15:34 PM: > node scripts/postinstall
5:15:35 PM: > jss#9.8.7 postinstall /opt/build/repo/node_modules/jss
5:15:35 PM: > node -e "console.log('\u001b[35m\u001b[1mLove JSS? You can now support us on open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/jss/donate\u001b[0m')"
5:15:35 PM: Love JSS? You can now support us on open collective:
5:15:35 PM: > https://opencollective.com/jss/donate
5:15:35 PM: > firebase-functions#2.3.1 postinstall /opt/build/repo/node_modules/firebase-functions
5:15:35 PM: > node ./upgrade-warning
5:15:35 PM: ======== WARNING! ========
5:15:35 PM: This upgrade of firebase-functions contains breaking changes if you are upgrading from a version below v1.0.0.
5:15:35 PM: To see a complete list of these breaking changes, please go to:
5:15:35 PM: https://firebase.google.com/docs/functions/beta-v1-diff
5:15:37 PM: npm WARN
5:15:37 PM: optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/jest-haste-map/node_modules/fsevents):
5:15:37 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
5:15:37 PM: npm WARN
5:15:37 PM: optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/chokidar/node_modules/fsevents):
5:15:37 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
5:15:37 PM: npm
5:15:37 PM: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.0.6 (node_modules/fsevents):
5:15:37 PM: npm
5:15:37 PM: WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.0.6: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
5:15:37 PM: added 1849 packages from 1018 contributors and audited 890418 packages in 35.912s
5:15:37 PM: found 0 vulnerabilities
5:15:37 PM: NPM modules installed
5:15:37 PM: Started restoring cached go cache
5:15:37 PM: Finished restoring cached go cache
5:15:38 PM: unset GOOS;
5:15:38 PM: unset GOARCH;
5:15:38 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
5:15:38 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
5:15:38 PM: go version >&2;
5:15:38 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
5:15:38 PM: go version go1.12 linux/amd64
5:15:38 PM: Installing missing commands
5:15:38 PM: Verify run directory
5:15:38 PM: Executing user command: npm run build
5:15:38 PM: > finalphyx#0.1.0 build /opt/build/repo
5:15:38 PM: > react-scripts build && echo '/* /index.html 200' > build/_redirects
5:15:39 PM: Creating an optimized production build...
5:16:15 PM: Compiled with warnings.
5:16:15 PM: ./src/Components/App/index.js
5:16:15 PM: Line 13: 'FourZeroFourPage' is defined but never used no-unused-vars
5:16:15 PM: Line 15: 'Switch' is defined but never used no-unused-vars
5:16:15 PM: ./src/Pages/SubscribePage/index.jsx
manifest.json:
{
"short_name": "Phyxable",
"name": "Phyxable",
"icons": [
{
"src": "/images/icon-192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "/images/icon-512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"background_color": "#3367D6",
"display": "standalone",
"scope": "/",
"theme_color": "#3367D6"
}
package.json :
{
"name": "finalphyx",
"version": "0.1.0",
"private": true,
"dependencies": {
"#material-ui/lab": "^3.0.0-alpha.30",
"disable-scroll": "^0.4.1",
"firebase": "^6.1.1",
"firebase-functions": "^2.3.1",
"html-loader": "^0.5.5",
"mdbreact": "^4.15.0",
"netlify": "^2.4.6",
"react": "^16.8.6",
"react-bootstrap": "^0.32.4",
"react-div-100vh": "^0.3.4",
"react-dom": "^16.8.6",
"react-firebaseui": "^3.1.2",
"react-ga": "^2.5.7",
"react-jw-player": "^1.19.0",
"react-meta-tags": "^0.7.4",
"react-password-mask": "^3.3.1",
"react-player": "^1.11.0",
"react-responsive": "^7.0.0",
"react-router-dom": "^5.0.1",
"react-scripts": "^3.0.1",
"react-scroll": "^1.7.11",
"react-share": "^3.0.0",
"react-stripe-checkout": "^2.6.3",
"react-stripe-elements": "^3.0.0",
"recompose": "^0.30.0",
"stripe": "^7.1.0",
"video-react": "^0.13.7",
"waypoints": "^4.0.1",
"window-scroll-manager": "^1.1.4"
},
"devDependencies": {
"bundle-loader": "^0.5.6",
"prettier": "^1.18.2",
"pretty-quick": "^1.11.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build && echo '/* /index.html 200' > build/_redirects",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"deploy": "aws s3 sync build s3://www.phyxable.com"
},
"main": "index.js",
"repository": {
"type": "git",
"url": "git+https://jacobmjones#bitbucket.org/jacobmjones/web.git"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"homepage": "https://bitbucket.org/jacobmjones/web#readme",
"author": "",
"license": "ISC",
"description": ""
}
it should be working fine as it works great on localhost but doesn't.

EDIT I was able to resolve this by changing the packages.json file..
From this:
...
"homepage": "https://bitbucket.org/jacobmjones/web#readme",
"author": "",
"license": "ISC",
"description": ""
...
To this:
...
"homepage": "/",
"author": "",
"license": "ISC",
"description": ""
...
This is happening due to mixed content which is preventing your CSS from loading...
Wherever you are importing this CSS within your app: 'http://video-react.js.org/assets/video-react.css'..
..change it to this, and it should work:
'https://video-react.js.org/assets/video-react.css'
Notice the https... You cannot use XHR on a secure (https) connection to retrieve resources on an insecure connection (http).. Your Netlify site is on https and that CSS file is on http - which qualifies for mixed-content.
Chrome
docs
Mozilla/Firefox docs

Error seems to be in 'unexpected token <'
The error Uncaught SyntaxError: Unexpected token < is most commonly caused by your site’s code referring to an asset that is no longer available. Most commonly, this is due to a filename change in assets generated during your build. The same situation happens if you use versioned or chunked javascript where the filename changes with every deploy.
Source: https://community.netlify.com/t/common-issue-why-do-i-see-uncaught-syntaxerror-unexpected-token-errors-how-can-i-use-chunking-or-versioning-for-my-assets-at-netlify/124
In addition, See if you can get any clues from here:
https://www.netlify.com/docs/build-gotchas/
Also, try upgrading node version to the latest one.

Related

Issues deploying a React app on Netlify Command failed with exit code 127: build (https://ntl.fyi/exit-code-127)

I was trying to deploy a react app using Netlify but I am encountering some issues.
See below the errors in deployment phase:
12:02:58 PM: build-image version: d7b3813f01c06610bc1723ff1b22446513ee7941 (focal)
12:02:58 PM: build-image tag: v4.14.3
12:02:58 PM: buildbot version: bd7961a85189b0e0340a6a33e02f396d2d9c7afa
12:02:58 PM: Fetching cached dependencies
12:02:58 PM: Failed to fetch cache, continuing with build
12:02:58 PM: Starting to prepare the repo for build
12:02:58 PM: No cached dependencies found. Cloning fresh repo
12:02:58 PM: git clone https://github.com/SimoGhilo/Reddit_Clone
12:02:59 PM: Preparing Git Reference refs/heads/Main
12:02:59 PM: Parsing package.json dependencies
12:03:00 PM: Starting build script
12:03:00 PM: Installing dependencies
12:03:00 PM: Python version set to 2.7
12:03:01 PM: v16.18.0 is already installed.
12:03:01 PM: Now using node v16.18.0 (npm v8.19.2)
12:03:01 PM: Enabling node corepack
12:03:01 PM: Started restoring cached build plugins
12:03:01 PM: Finished restoring cached build plugins
12:03:01 PM: Attempting ruby version 2.7.2, read from environment
12:03:02 PM: Using ruby version 2.7.2
12:03:02 PM: Using PHP version 8.0
12:03:02 PM: No npm workspaces detected
12:03:02 PM: Started restoring cached node modules
12:03:02 PM: Finished restoring cached node modules
12:03:02 PM: Installing NPM modules using NPM version 8.19.2
12:03:07 PM: npm WARN deprecated stable#0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
12:03:09 PM: npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
12:03:14 PM: added 1462 packages, and audited 1463 packages in 12s
12:03:14 PM: 209 packages are looking for funding
12:03:14 PM: run `npm fund` for details
12:03:14 PM: 8 high severity vulnerabilities
12:03:14 PM: To address issues that do not require attention, run:
12:03:14 PM: npm audit fix
12:03:14 PM: To address all issues (including breaking changes), run:
12:03:14 PM: npm audit fix --force
12:03:14 PM: Run `npm audit` for details.
12:03:14 PM: NPM modules installed
12:03:14 PM: Creating package sha
12:03:14 PM: Started restoring cached go cache
12:03:14 PM: Finished restoring cached go cache
12:03:14 PM: Installing Go version 1.17 (requested 1.17)
12:03:18 PM: unset GOOS;
12:03:18 PM: unset GOARCH;
12:03:18 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.17.linux.amd64';
12:03:18 PM: export PATH="/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}";
12:03:18 PM: go version >&2;
12:03:18 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.17.linux.amd64.env"
12:03:18 PM: go version go1.17 linux/amd64
12:03:19 PM: Detected the following frameworks and their versions:
12:03:19 PM: "create-react-app" at version "5.0.1"
12:03:19 PM: Installing missing commands
12:03:19 PM: Verify run directory
12:03:20 PM: ​
12:03:20 PM: ────────────────────────────────────────────────────────────────
12:03:20 PM: Netlify Build
12:03:20 PM: ────────────────────────────────────────────────────────────────
12:03:20 PM: ​
12:03:20 PM: ❯ Version
12:03:20 PM: #netlify/build 28.1.6
12:03:20 PM: ​
12:03:20 PM: ❯ Flags
12:03:20 PM: baseRelDir: true
12:03:20 PM: buildId: 63625c70591ae7067c7e852e
12:03:20 PM: deployId: 63625c70591ae7067c7e8530
12:03:20 PM: ​
12:03:20 PM: ❯ Current directory
12:03:20 PM: /opt/build/repo
12:03:20 PM: ​
12:03:20 PM: ❯ Config file
12:03:20 PM: No config file was defined: using default values.
12:03:20 PM: ​
12:03:20 PM: ❯ Context
12:03:20 PM: production
12:03:20 PM: ​
12:03:20 PM: ────────────────────────────────────────────────────────────────
12:03:20 PM: 1. Build command from Netlify app
12:03:20 PM: ────────────────────────────────────────────────────────────────
12:03:20 PM: ​
12:03:20 PM: $ build
12:03:21 PM: Creating deploy upload records
12:03:20 PM: bash: build: command not found
12:03:20 PM: ​
12:03:20 PM: ────────────────────────────────────────────────────────────────
12:03:20 PM: "build.command" failed
12:03:20 PM: ────────────────────────────────────────────────────────────────
12:03:21 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
12:03:20 PM: ​
12:03:20 PM: Error message
12:03:20 PM: Command failed with exit code 127: build (https://ntl.fyi/exit-code-127)
12:03:20 PM: ​
12:03:20 PM: Error location
12:03:20 PM: In Build command from Netlify app:
12:03:20 PM: build
12:03:20 PM: ​
12:03:20 PM: Resolved config
12:03:20 PM: build:
12:03:20 PM: command: build
12:03:20 PM: commandOrigin: ui
12:03:20 PM: environment:
12:03:20 PM: - CI
12:03:20 PM: publish: /opt/build/repo
12:03:20 PM: publishOrigin: default
12:03:20 PM: Caching artifacts
12:03:20 PM: Started saving node modules
12:03:20 PM: Finished saving node modules
12:03:20 PM: Started saving build plugins
12:03:20 PM: Finished saving build plugins
12:03:20 PM: Started saving pip cache
12:03:20 PM: Finished saving pip cache
12:03:20 PM: Started saving emacs cask dependencies
12:03:21 PM: Finished saving emacs cask dependencies
12:03:21 PM: Started saving maven dependencies
12:03:21 PM: Finished saving maven dependencies
12:03:21 PM: Started saving boot dependencies
12:03:21 PM: Finished saving boot dependencies
12:03:21 PM: Started saving rust rustup cache
12:03:21 PM: Finished saving rust rustup cache
12:03:21 PM: Started saving go dependencies
12:03:21 PM: Finished saving go dependencies
12:03:21 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
12:03:21 PM: Failing build: Failed to build site
12:03:21 PM: Finished processing build request in 23.43614482s
Also see my package.json:
{
"name": "reddit_project",
"version": "0.1.0",
"private": true,
"dependencies": {
"#reduxjs/toolkit": "^1.8.6",
"#testing-library/jest-dom": "^5.16.5",
"#testing-library/react": "^13.4.0",
"#testing-library/user-event": "^14.4.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.0.4",
"react-router-dom": "^6.4.2",
"react-scripts": "5.0.1",
"redux": "^4.2.0",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "CI= npm run build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"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"
]
}
}
And below are my environment variables:
Please note that the value covered is false.
I Have researched and tried different things, I changed my package.json then tweaked my setting but all seems to not produce any result.
What am i doing wrong ?
Thank you for your help.

WebpackError: TypeError: merge is not a function (from plugin: gatsby-plugin-react-helmet)

My Gatsby blog is deployed on Netlify. Everything was working fine, until yesterday when the deployment failed for the following reason:
WebpackError: TypeError: merge is not a function (from plugin: gatsby-plugin-react-helmet)
The complete deploy log is shown below:
11:26:10 PM: build-image version: d7b3813f01c06610bc1723ff1b22446513ee7941 (focal)
11:26:10 PM: build-image tag: v4.14.3
11:26:10 PM: buildbot version: be0925a1b4e8f8d2c5a767f3e0decf8856cad273
11:26:11 PM: Fetching cached dependencies
11:26:11 PM: Failed to fetch cache, continuing with build
11:26:11 PM: Starting to prepare the repo for build
11:26:11 PM: No cached dependencies found. Cloning fresh repo
11:26:11 PM: git clone https://github.com/sundaray/hemanta.io
11:26:12 PM: Preparing Git Reference refs/heads/master
11:26:13 PM: Parsing package.json dependencies
11:26:14 PM: Starting build script
11:26:14 PM: Installing dependencies
11:26:14 PM: Python version set to 2.7
11:26:14 PM: Downloading and installing node v12.18.0...
11:26:14 PM: Downloading https://nodejs.org/dist/v12.18.0/node-v12.18.0-linux-x64.tar.xz...
11:26:15 PM: Computing checksum with sha256sum
11:26:15 PM: Checksums matched!
11:26:16 PM: Now using node v12.18.0 (npm v6.14.4)
11:26:16 PM: Started restoring cached build plugins
11:26:16 PM: Finished restoring cached build plugins
11:26:16 PM: Attempting ruby version 2.7.1, read from environment
11:26:16 PM: Required ruby-2.7.1 is not installed - installing.
11:26:17 PM: Searching for binary rubies, this might take some time.
11:26:17 PM: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/20.04/x86_64/ruby-2.7.1.tar.bz2
11:26:17 PM: Checking requirements for ubuntu.
11:26:17 PM: Requirements installation successful.
11:26:17 PM: ruby-2.7.1 - #configure
11:26:17 PM: ruby-2.7.1 - #download
11:26:17 PM: ruby-2.7.1 - #validate archive
11:26:20 PM: ruby-2.7.1 - #extract
11:26:22 PM: ruby-2.7.1 - #validate binary
11:26:22 PM: ruby-2.7.1 - #setup
11:26:23 PM: ruby-2.7.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.1#global
11:26:23 PM: ruby-2.7.1 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems........................................
11:26:23 PM: ruby-2.7.1 - #generating global wrappers........
11:26:23 PM: ruby-2.7.1 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.7.1
11:26:23 PM: ruby-2.7.1 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
11:26:23 PM: ruby-2.7.1 - #generating default wrappers........
11:26:23 PM: Using /opt/buildhome/.rvm/gems/ruby-2.7.1
11:26:24 PM: Using ruby version 2.7.1
11:26:24 PM: Using PHP version 8.0
11:26:24 PM: No npm workspaces detected
11:26:24 PM: Started restoring cached node modules
11:26:24 PM: Finished restoring cached node modules
11:26:24 PM: Installing NPM modules using NPM version 6.14.4
11:26:29 PM: npm WARN deprecated multer#1.4.4: Multer 1.x is affected by CVE-2022-24434. This is fixed in v1.4.4-lts.1 which drops support for versions of Node.js before 6. Please upgrade to at least Node.js 6 and version 1.4.4-lts.1 of Multer. If you need support for older versions of Node.js, we are open to accepting patches that would fix the CVE on the main 1.x release line, whilst maintaining compatibility with Node.js 0.10.
11:26:29 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.
11:26:30 PM: npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
11:26:34 PM: npm WARN deprecated gatsby-recipes#0.25.0: gatsby-recipes has been removed from gatsby/gatsby-cli >=4.5.0. Update to gatsby#latest/gatsby-cli#latest to use versions without gatsby-recipes. This package will no longer receive updates.
11:26:36 PM: npm WARN deprecated async-cache#1.1.0: No longer maintained. Use [lru-cache](http://npm.im/lru-cache) version 7.6 or higher, and provide an asynchronous `fetchMethod` option.
11:26:36 PM: npm WARN deprecated stable#0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
11:26:37 PM: npm WARN deprecated querystring#0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
11:26:40 PM: npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
11:26:40 PM: npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
11:26:43 PM: npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
11:26:43 PM: npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
11:26:43 PM: npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
11:26:44 PM: npm WARN deprecated subscriptions-transport-ws#0.9.19: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
11:26:47 PM: npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
11:26:49 PM: npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
11:26:49 PM: npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
11:26:49 PM: npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
11:40:12 PM: > sharp#0.29.3 install /opt/build/repo/node_modules/sharp
11:40:12 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
11:40:13 PM: sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.11.3/libvips-8.11.3-linux-x64.tar.br
11:40:14 PM: > #fortawesome/fontawesome-common-types#0.2.36 postinstall /opt/build/repo/node_modules/#fortawesome/fontawesome-common-types
11:40:14 PM: > node attribution.js
11:40:14 PM: Font Awesome Free 0.2.36 by #fontawesome - https://fontawesome.com
11:40:14 PM: License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
11:40:14 PM: > core-js#3.26.0 postinstall /opt/build/repo/node_modules/core-js
11:40:14 PM: > node -e "try{require('./postinstall')}catch(e){}"
11:40:14 PM: > core-js-pure#3.26.0 postinstall /opt/build/repo/node_modules/core-js-pure
11:40:14 PM: > node -e "try{require('./postinstall')}catch(e){}"
11:40:15 PM: > es5-ext#0.10.62 postinstall /opt/build/repo/node_modules/es5-ext
11:40:15 PM: > node -e "try{require('./_postinstall')}catch(e){}" || exit 0
11:40:15 PM: > gatsby-telemetry#2.14.0 postinstall /opt/build/repo/node_modules/gatsby-telemetry
11:40:15 PM: > node src/postinstall.js || true
11:40:15 PM: > gatsby-cli#3.14.2 postinstall /opt/build/repo/node_modules/gatsby/node_modules/gatsby-cli
11:40:15 PM: > node scripts/postinstall.js
11:40:15 PM: > #fortawesome/fontawesome-svg-core#1.2.36 postinstall /opt/build/repo/node_modules/#fortawesome/fontawesome-svg-core
11:40:15 PM: > node attribution.js
11:40:15 PM: Font Awesome Free 1.2.36 by #fontawesome - https://fontawesome.com
11:40:15 PM: License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
11:40:15 PM: > #fortawesome/free-solid-svg-icons#5.15.4 postinstall /opt/build/repo/node_modules/#fortawesome/free-solid-svg-icons
11:40:15 PM: > node attribution.js
11:40:15 PM: Font Awesome Free 5.15.4 by #fontawesome - https://fontawesome.com
11:40:15 PM: License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
11:40:15 PM: > gatsby#3.14.6 postinstall /opt/build/repo/node_modules/gatsby
11:40:15 PM: > node scripts/postinstall.js
11:40:16 PM: npm notice created a lockfile as package-lock.json. You should commit this file.
11:40:16 PM: npm WARN notsup Unsupported engine for gatsby-remark-katex#6.24.0: wanted: {"node":">=14.15.0"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:40:16 PM: npm WARN notsup Not compatible with your version of node/npm: gatsby-remark-katex#6.24.0
11:40:16 PM: npm WARN notsup Unsupported engine for react-hook-form#7.39.3: wanted: {"node":">=12.22.0"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:40:16 PM: npm WARN notsup Not compatible with your version of node/npm: react-hook-form#7.39.3
11:40:16 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.3.2 (node_modules/chokidar/node_modules/fsevents):
11:40:16 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
11:40:16 PM: npm WARN notsup Unsupported engine for type-fest#2.19.0: wanted: {"node":">=12.20"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:40:16 PM: npm WARN notsup Not compatible with your version of node/npm: type-fest#2.19.0
11:40:16 PM: npm WARN notsup Unsupported engine for gatsby-plugin-postcss#5.24.0: wanted: {"node":">=14.15.0"} (current: {"node":"12.18.0","npm":"6.14.4"})
11:40:16 PM: npm WARN notsup Not compatible with your version of node/npm: gatsby-plugin-postcss#5.24.0
11:40:16 PM: npm WARN bootstrap#5.2.2 requires a peer of #popperjs/core#^2.11.6 but none is installed. You must install peer dependencies yourself.
11:40:16 PM: npm WARN gatsby-plugin-typography#3.14.0 requires a peer of typography#^0.16.0 || ^1.0.0-alpha.0 but none is installed. You must install peer dependencies yourself.
11:40:16 PM: npm WARN gatsby-remark-katex#6.24.0 requires a peer of gatsby#^4.0.0-next but none is installed. You must install peer dependencies yourself.
11:40:16 PM: npm WARN gatsby-remark-katex#6.24.0 requires a peer of katex#^0.13.3 but none is installed. You must install peer dependencies yourself.
11:40:16 PM: npm WARN gatsby-remark-reading-time#1.1.0 requires a peer of gatsby#^2.0.0 but none is installed. You must install peer dependencies yourself.
11:40:16 PM: npm WARN eslint-config-react-app#6.0.0 requires a peer of babel-eslint#^10.0.0 but none is installed. You must install peer dependencies yourself.
11:40:16 PM: 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.
11:40:16 PM: npm WARN ts-node#9.1.1 requires a peer of typescript#>=2.7 but none is installed. You must install peer dependencies yourself.
11:40:16 PM: npm WARN acorn-import-assertions#1.8.0 requires a peer of acorn#^8 but none is installed. You must install peer dependencies yourself.
11:40:16 PM: npm WARN gatsby-plugin-postcss#5.24.0 requires a peer of gatsby#^4.0.0-next but none is installed. You must install peer dependencies yourself.
11:40:16 PM: added 2214 packages from 1135 contributors and audited 2219 packages in 831.887s
11:40:17 PM: 363 packages are looking for funding
11:40:17 PM: run `npm fund` for details
11:40:17 PM: found 38 vulnerabilities (16 moderate, 16 high, 6 critical)
11:40:17 PM: run `npm audit fix` to fix them, or `npm audit` for details
11:40:17 PM: NPM modules installed
11:40:17 PM: Creating package sha
11:40:17 PM: Started restoring cached go cache
11:40:17 PM: Finished restoring cached go cache
11:40:17 PM: Installing Go version 1.14.4 (requested 1.14.4)
11:40:21 PM: unset GOOS;
11:40:21 PM: unset GOARCH;
11:40:21 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.14.4.linux.amd64';
11:40:21 PM: export PATH="/opt/buildhome/.gimme/versions/go1.14.4.linux.amd64/bin:${PATH}";
11:40:21 PM: go version >&2;
11:40:21 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.14.4.linux.amd64.env"
11:40:21 PM: go version go1.14.4 linux/amd64
11:40:21 PM: Detected 1 framework(s)
11:40:21 PM: "gatsby" at version "3.14.6"
11:40:21 PM: Installing missing commands
11:40:21 PM: Verify run directory
11:40:23 PM: ​
11:40:23 PM: ────────────────────────────────────────────────────────────────
11:40:23 PM: Netlify Build
11:40:23 PM: ────────────────────────────────────────────────────────────────
11:40:23 PM: ​
11:40:23 PM: ❯ Version
11:40:23 PM: #netlify/build 28.1.13
11:40:23 PM: ​
11:40:23 PM: ❯ Flags
11:40:23 PM: baseRelDir: true
11:40:23 PM: buildId: 63712fb964e5d200085e449c
11:40:23 PM: deployId: 63712fb964e5d200085e449e
11:40:23 PM: ​
11:40:23 PM: ❯ Current directory
11:40:23 PM: /opt/build/repo
11:40:23 PM: ​
11:40:23 PM: ❯ Config file
11:40:23 PM: No config file was defined: using default values.
11:40:23 PM: ​
11:40:23 PM: ❯ Context
11:40:23 PM: production
11:40:23 PM: ​
11:40:23 PM: ────────────────────────────────────────────────────────────────
11:40:23 PM: 1. Build command from Netlify app
11:40:23 PM: ────────────────────────────────────────────────────────────────
11:40:23 PM: ​
11:40:23 PM: $ npm run build
11:40:23 PM: > gatsby-starter-hello-world#0.1.0 build /opt/build/repo
11:40:23 PM: > gatsby build
11:40:24 PM: warning Plugin gatsby-plugin-postcss is not compatible with your gatsby version 3.14.6 - It requires gatsby#^4.0.0-next
11:40:25 PM: warning Plugin gatsby-remark-reading-time is not compatible with your gatsby version 3.14.6 - It requires gatsby#^2.0.0
11:40:25 PM: warning Plugin gatsby-plugin-postcss is not compatible with your gatsby version 3.14.6 - It requires gatsby#^4.0.0-next
11:40:25 PM: warning Plugin gatsby-remark-reading-time is not compatible with your gatsby version 3.14.6 - It requires gatsby#^2.0.0
11:40:25 PM: success open and validate gatsby-configs, load plugins - 0.580s
11:40:25 PM: success onPreInit - 0.002s
11:40:25 PM: success initialize cache - 0.031s
11:40:25 PM: success copy gatsby files - 0.034s
11:40:25 PM: success Compiling Gatsby Functions - 0.159s
11:40:25 PM: success onPreBootstrap - 0.166s
11:40:26 PM: success createSchemaCustomization - 0.411s
11:40:34 PM: success Checking for changed pages - 0.000s
11:40:34 PM: success source and transform nodes - 8.299s
11:40:35 PM: success building schema - 0.396s
11:40:35 PM: success createPages - 0.158s
11:40:35 PM: success createPagesStatefully - 0.064s
11:40:35 PM: info Total nodes: 2699, SitePage nodes: 541 (use --verbose for breakdown)
11:40:35 PM: success Checking for changed pages - 0.000s
11:40:35 PM: success update schema - 0.099s
11:40:35 PM: success onPreExtractQueries - 0.000s
11:40:35 PM: success extract queries from components - 0.305s
11:40:35 PM: success write out redirect data - 0.000s
11:40:35 PM: success onPostBootstrap - 0.000s
11:40:35 PM: info bootstrap finished - 12.272s
11:40:35 PM: success run static queries - 0.003s - 1/1 324.33/s
11:41:40 PM: success run page queries - 64.400s - 541/541 8.40/s
11:41:40 PM: success write out requires - 0.007s
11:41:56 PM: success Building production JavaScript and CSS bundles - 16.351s
11:41:56 PM: success Rewriting compilation hashes - 0.048s
11:41:56 PM: success Writing page-data.json files to public directory - 0.440s - 541/541 1229.54/s
11:42:01 PM: success Building HTML renderer - 2.486s
11:42:02 PM: error Page data from page-data.json for the failed page "/review-January-2022/": {
11:42:02 PM: "componentChunkName": "component---src-templates-blog-post-js",
11:42:02 PM: "path": "/review-January-2022/",
11:42:02 PM: "result": {
11:42:02 PM: "data": {
11:42:02 PM: "markdownRemark": {
11:42:02 PM: "html": "<p>In January, I achieved my target of writing 10 blog posts.</p>\n<p>My original plan was to build a developer blog using Gatsby. Even though I started following the tutorial on the official Gatsby site, I veered off course. I practiced a little b...",
11:42:02 PM: "frontmatter": {
11:42:02 PM: "title": "Review - January, 2022",
11:42:02 PM: "date": "2022-02-01"
11:42:02 PM: }
11:42:02 PM: }
11:42:02 PM: },
11:42:02 PM: "pageContext": {
11:42:02 PM: "slug": "/review-January-2022/",
11:42:02 PM: "prev": {
11:42:02 PM: "fields": {
11:42:02 PM: "slug": "/define-python-functions-with-unlimited-keyword-arguments-using-kwargs/"
11:42:02 PM: },
11:42:02 PM: "frontmatter": {
11:42:02 PM: "modules": null
11:42:02 PM: }
11:42:02 PM: },
11:42:02 PM: "next": {
11:42:02 PM: "fields": {
11:42:02 PM: "slug": "/check-the-type-of-a-python-variable/"
11:42:02 PM: },
11:42:02 PM: "frontmatter": {
11:42:02 PM: "modules": null
11:42:02 PM: }
11:42:02 PM: }
11:42:02 PM: }
11:42:02 PM: },
11:42:02 PM: "staticQueryHashes": [
11:42:02 PM: "3159585216"
11:42:02 PM: ]
11:42:02 PM: }
11:42:02 PM: failed Building static HTML for pages - 1.409s
11:42:02 PM: error Building static HTML failed for path "/review-January-2022/"
11:42:02 PM:
11:42:02 PM: 100 | }
11:42:02 PM: 101 |
11:42:02 PM: > 102 | return merge(a, b, { arrayMerge: combineMerge })
11:42:02 PM: | ^
11:42:02 PM: 103 | }
11:42:02 PM: 104 |
11:42:02 PM: 105 | export default async function staticPage({
11:42:02 PM:
11:42:02 PM: WebpackError: TypeError: merge is not a function (from plugin: gatsby-plugin-r eact-helmet)
11:42:02 PM:
11:42:02 PM: - static-entry.js:102
11:42:02 PM: gatsby-starter-hello-world/.cache/static-entry.js:102:10
11:42:02 PM:
11:42:02 PM: - static-entry.js:166
11:42:02 PM: gatsby-starter-hello-world/.cache/static-entry.js:166:24
11:42:02 PM:
11:42:02 PM: - gatsby-ssr.js:17
11:42:02 PM: [gatsby-starter-hello-world]/[gatsby-plugin-react-helmet]/gatsby-ssr.js:17:5
11:42:02 PM: - api-runner-ssr.js:52
11:42:02 PM: gatsby-starter-hello-world/.cache/api-runner-ssr.js:52:22
11:42:02 PM:
11:42:02 PM: - api-runner-ssr.js:45
11:42:02 PM: gatsby-starter-hello-world/.cache/api-runner-ssr.js:45:11
11:42:02 PM:
11:42:02 PM: - static-entry.js:307
11:42:02 PM: gatsby-starter-hello-world/.cache/static-entry.js:307:5
11:42:02 PM:
11:42:02 PM: - index.es.js:121
11:42:02 PM: [gatsby-starter-hello-world]/[#fortawesome]/free-solid-svg-icons/index.es.js :121:1
11:42:02 PM:
11:42:02 PM:
11:42:02 PM: not finished Caching JavaScript and CSS webpack compilation - 6.127s
11:42:02 PM: not finished Caching HTML renderer compilation - 1.518s
11:42:02 PM: npm ERR! code ELIFECYCLE
11:42:02 PM: npm ERR! errno 1
11:42:02 PM: npm ERR! gatsby-starter-hello-world#0.1.0 build: `gatsby build`
11:42:02 PM: npm ERR! Exit status 1
11:42:02 PM: npm ERR!
11:42:02 PM: npm ERR! Failed at the gatsby-starter-hello-world#0.1.0 build script.
11:42:02 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
11:42:02 PM: npm ERR! A complete log of this run can be found in:
11:42:02 PM: npm ERR! /opt/buildhome/.npm/_logs/2022-11-13T18_12_02_730Z-debug.log
11:42:02 PM: ​
11:42:02 PM: ────────────────────────────────────────────────────────────────
11:42:02 PM: "build.command" failed
11:42:02 PM: ────────────────────────────────────────────────────────────────
11:42:02 PM: ​
11:42:02 PM: Error message
11:42:02 PM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
11:42:02 PM: ​
11:42:02 PM: Error location
11:42:02 PM: In Build command from Netlify app:
11:42:02 PM: npm run build
11:42:02 PM: ​
11:42:02 PM: Resolved config
11:42:02 PM: build:
11:42:02 PM: command: npm run build
11:42:02 PM: commandOrigin: ui
11:42:02 PM: publish: /opt/build/repo/public
11:42:02 PM: publishOrigin: ui
11:42:03 PM: Caching artifacts
11:42:03 PM: Started saving node modules
11:42:03 PM: Finished saving node modules
11:42:03 PM: Started saving build plugins
11:42:03 PM: Finished saving build plugins
11:42:03 PM: Started saving pip cache
11:42:03 PM: Finished saving pip cache
11:42:03 PM: Started saving emacs cask dependencies
11:42:03 PM: Finished saving emacs cask dependencies
11:42:03 PM: Started saving maven dependencies
11:42:03 PM: Finished saving maven dependencies
11:42:03 PM: Started saving boot dependencies
11:42:03 PM: Finished saving boot dependencies
11:42:03 PM: Started saving rust rustup cache
11:42:03 PM: Finished saving rust rustup cache
11:42:03 PM: Started saving go dependencies
11:42:03 PM: Finished saving go dependencies
11:42:08 PM: Cached ruby version 2.7.1
11:42:08 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:42:08 PM: Creating deploy upload records
11:42:08 PM: Failing build: Failed to build site
11:42:08 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
11:42:08 PM: Finished processing build request in 15m58.036179676s
What do I need to do to fix this error?
Found this on GitHub:
"Another temporary solution is adding explicitely deepmerge dependency to your project."
Hope it helps.
https://github.com/gatsbyjs/gatsby/issues/33274

Having trouble getting react website to build in Netlify from github

Created a react app and have it working fine on my local server.I used Github as my source control and have all packages up to date, and a build filed created
I then uploaded it to Netlify and connected it to my Github. Once i tried to have it hosted, it failed the build process.
here is a snippet of the deploy log i get, i cant fit all of it on here
10:05:56 AM: Build ready to start
10:05:59 AM: build-image version: a6bb34428a07e7de82f4df5dfe1843fbde91f670 (focal)
10:05:59 AM: build-image tag: v4.5.1
10:05:59 AM: buildbot version: 047dc2001d6cf9f76ba77ae34521e2065ab5c2bd
10:05:59 AM: Fetching cached dependencies
10:05:59 AM: Failed to fetch cache, continuing with build
10:05:59 AM: Starting to prepare the repo for build
10:05:59 AM: No cached dependencies found. Cloning fresh repo
10:05:59 AM: git clone https://github.com/jmoonoz/Moonoz2.0
10:06:01 AM: Preparing Git Reference refs/heads/master
10:06:02 AM: Parsing package.json dependencies
10:06:02 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'build' versus '/build' in the Netlify UI
10:06:03 AM: Starting build script
10:06:03 AM: Installing dependencies
10:06:03 AM: Python version set to 2.7
10:06:03 AM: v16.13.1 is already installed.
10:06:04 AM: Now using node v16.13.1 (npm v8.1.2)
10:06:04 AM: Started restoring cached build plugins
10:06:04 AM: Finished restoring cached build plugins
10:06:04 AM: Attempting ruby version 2.7.2, read from environment
10:06:06 AM: Using ruby version 2.7.2
10:06:06 AM: Using PHP version 8.0
10:06:06 AM: Started restoring cached node modules
10:06:06 AM: Finished restoring cached node modules
10:06:07 AM: Installing NPM modules using NPM version 8.1.2
10:06:26 AM: npm WARN deprecated flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
10:06:26 AM: npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
10:06:26 AM: npm WARN deprecated har-validator#5.1.5: this library is no longer supported
10:06:26 AM: npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
10:06:28 AM: 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.
10:06:28 AM: 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.
10:06:29 AM: npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
10:06:30 AM: npm WARN deprecated sane#4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
10:06:30 AM: npm WARN deprecated querystring#0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
10:06:31 AM: npm WARN deprecated rollup-plugin-babel#4.4.0: This package has been deprecated and is no longer maintained. Please use #rollup/plugin-babel.
10:06:41 AM: npm WARN deprecated babel-eslint#10.1.0: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
10:06:43 AM: npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
10:06:43 AM: npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
10:06:44 AM: npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
10:06:45 AM: npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
10:06:46 AM: npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
10:06:46 AM: npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
10:06:46 AM: npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
10:06:47 AM: npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
10:06:49 AM: npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
10:06:57 AM: npm WARN deprecated core-js#2.6.12: core-js#<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
10:10:03 AM: npm ERR! code 1
10:10:03 AM: npm ERR! path /opt/build/repo/node_modules/node-sass
10:10:03 AM: npm ERR! command failed
10:10:03 AM: npm ERR! command sh -c node scripts/build.js
...
10:10:03 AM: npm ERR! gyp ERR! cwd /opt/build/repo/node_modules/node-sass
10:10:03 AM: npm ERR! gyp ERR! node -v v16.13.1
10:10:03 AM: npm ERR! gyp ERR! node-gyp -v v7.1.2
10:10:03 AM: npm ERR! gyp ERR! not ok
10:10:03 AM: npm ERR! Build failed with error code: 1
10:10:03 AM: npm ERR! A complete log of this run can be found in:
10:10:03 AM: npm ERR! /opt/buildhome/.npm/_logs/2021-12-08T18_10_03_338Z-debug.log
10:10:03 AM: Error during NPM install
10:10:03 AM: Build was terminated: Build script returned non-zero exit code: 1
10:10:03 AM: Failing build: Failed to build site
here is my package.json file
{
"name": "moonoz2.0",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^5.11.4",
"#testing-library/react": "^11.1.0",
"#testing-library/user-event": "^12.1.10",
"bootstrap": "^5.1.3",
"bootstrap-icons": "^1.6.1",
"core-js": "^3.19.3",
"emailjs-com": "^3.2.0",
"imagesloaded": "^4.1.4",
"masonry-layout": "^4.2.2",
"node-gyp": "^8.4.1",
"node-sass": "^5.0.0",
"react": "^17.0.2",
"react-bootstrap": "^2.0.0",
"react-dom": "^17.0.2",
"react-icons": "^4.3.1",
"react-router-dom": "^6.0.2",
"react-scripts": "4.0.3",
"tar": "^6.1.11",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"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"
]
}
}

Netlify "build.command" failed for gatsby website

I've recently updated some plugins on my Gatsby website. It works fine locally but it is failing the deploy on Netlify.
The error I'm getting is:
"build.command" failed - Command was killed with SIGSEGV (Segmentation fault): gatsby build.
I'm thinking that some of the plugin updates might be the cause.
Thanks for your help!
Netlify deploy log:
3:25:55 PM: Build ready to start
3:25:57 PM: build-image version: 53b83b6bede2920f236b25b6f5a95334320dc849
3:25:57 PM: build-image tag: v3.6.0
3:25:57 PM: buildbot version: 8ae026ef4905d9174e416775c6b64aa19950569b
3:25:57 PM: Fetching cached dependencies
3:25:57 PM: Starting to download cache of 835.8MB
3:26:04 PM: Finished downloading cache in 7.766503086s
3:26:04 PM: Starting to extract cache
3:26:22 PM: Finished extracting cache in 17.591359336s
3:26:22 PM: Finished fetching cache in 25.565252333s
3:26:22 PM: Starting to prepare the repo for build
3:26:23 PM: Preparing Git Reference refs/heads/master
3:26:28 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'public' versus 'public/' in the Netlify UI
3:26:28 PM: Starting build script
3:26:28 PM: Installing dependencies
3:26:28 PM: Python version set to 2.7
3:26:29 PM: Started restoring cached node version
3:26:32 PM: Finished restoring cached node version
3:26:33 PM: v10.23.0 is already installed.
3:26:33 PM: Now using node v10.23.0 (npm v6.14.8)
3:26:33 PM: Started restoring cached build plugins
3:26:33 PM: Finished restoring cached build plugins
3:26:34 PM: Attempting ruby version 2.6.2, read from environment
3:26:35 PM: Using ruby version 2.6.2
3:26:35 PM: Using PHP version 5.6
3:26:35 PM: Started restoring cached node modules
3:26:35 PM: Finished restoring cached node modules
3:26:36 PM: Installing NPM modules using NPM version 6.14.8
3:27:00 PM: > sharp#0.26.3 install /opt/build/repo/node_modules/gatsby-plugin-sharp/node_modules/sharp
3:27:00 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
3:27:01 PM: info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.0/libvips-8.10.0-linux-x64.tar.br
3:27:04 PM: > sharp#0.26.3 install /opt/build/repo/node_modules/gatsby-transformer-sharp/node_modules/sharp
3:27:04 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
3:27:05 PM: info sharp Using cached /opt/buildhome/.npm/_libvips/libvips-8.10.0-linux-x64.tar.br
3:27:06 PM: > core-js#2.6.12 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
3:27:06 PM: > node -e "try{require('./postinstall')}catch(e){}"
3:27:06 PM: > core-js#3.8.1 postinstall /opt/build/repo/node_modules/core-js
3:27:06 PM: > node -e "try{require('./postinstall')}catch(e){}"
3:27:06 PM: > core-js-pure#3.8.1 postinstall /opt/build/repo/node_modules/core-js-pure
3:27:06 PM: > node -e "try{require('./postinstall')}catch(e){}"
3:27:06 PM: > gatsby-telemetry#1.7.1 postinstall /opt/build/repo/node_modules/gatsby-telemetry
3:27:06 PM: > node src/postinstall.js || true
3:27:06 PM: > gatsby-cli#2.16.2 postinstall /opt/build/repo/node_modules/gatsby/node_modules/gatsby-cli
3:27:06 PM: > node scripts/postinstall.js
3:27:07 PM: > gatsby#2.29.2 postinstall /opt/build/repo/node_modules/gatsby
3:27:07 PM: > node scripts/postinstall.js
3:27:09 PM: npm WARN #tailwindcss/custom-forms#0.2.1 requires a peer of tailwindcss#^1.0 but none is installed. You must install peer dependencies yourself.
3:27:09 PM: npm WARN tsutils#3.17.1 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.
3:27:09 PM: npm WARN paolotodde.com#3.0.0 No description
3:27:09 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules/fsevents):
3:27:09 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
3:27:09 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.3 (node_modules/chokidar/node_modules/fsevents):
3:27:09 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
3:27:09 PM: added 321 packages from 167 contributors, removed 112 packages, updated 208 packages and audited 2568 packages in 32.574s
3:27:11 PM: 173 packages are looking for funding
3:27:11 PM: run `npm fund` for details
3:27:11 PM: found 0 vulnerabilities
3:27:11 PM: NPM modules installed
3:27:11 PM: Started restoring cached go cache
3:27:13 PM: Finished restoring cached go cache
3:27:13 PM: Installing Go version 1.12
3:27:13 PM: unset GOOS;
3:27:13 PM: unset GOARCH;
3:27:13 PM: export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64';
3:27:13 PM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64/bin:${PATH}";
3:27:13 PM: go version >&2;
3:27:13 PM: export GIMME_ENV='/opt/buildhome/.gimme_cache/env/go1.12.linux.amd64.env';
3:27:13 PM: go version go1.12 linux/amd64
3:27:13 PM: Installing missing commands
3:27:13 PM: Verify run directory
3:27:15 PM: ​
3:27:15 PM: ────────────────────────────────────────────────────────────────
3:27:15 PM: Netlify Build
3:27:15 PM: ────────────────────────────────────────────────────────────────
3:27:15 PM: ​
3:27:15 PM: ❯ Version
3:27:15 PM: #netlify/build 8.0.0
3:27:15 PM: ​
3:27:15 PM: ❯ Flags
3:27:15 PM: deployId: 5fe9f9033720d60008993f0a
3:27:15 PM: mode: buildbot
3:27:15 PM: ​
3:27:15 PM: ❯ Current directory
3:27:15 PM: /opt/build/repo
3:27:15 PM: ​
3:27:15 PM: ❯ Config file
3:27:15 PM: No config file was defined: using default values.
3:27:15 PM: ​
3:27:15 PM: ❯ Context
3:27:15 PM: production
3:27:15 PM: ​
3:27:15 PM: ────────────────────────────────────────────────────────────────
3:27:15 PM: 1. Build command from Netlify app
3:27:15 PM: ────────────────────────────────────────────────────────────────
3:27:15 PM: ​
3:27:15 PM: $ gatsby build
3:27:18 PM: success open and validate gatsby-configs - 0.413s
3:27:19 PM: success load plugins - 0.923s
3:27:19 PM: success onPreInit - 0.037s
3:27:19 PM: success delete html and css files from previous builds - 0.007s
3:27:19 PM: success initialize cache - 0.005s
3:27:19 PM: success copy gatsby files - 0.043s
3:27:19 PM: success onPreBootstrap - 0.021s
3:27:19 PM: success createSchemaCustomization - 0.035s
3:27:20 PM: success Checking for changed pages - 0.000s
3:27:20 PM: success source and transform nodes - 0.793s
3:27:20 PM: success building schema - 0.374s
3:27:20 PM: info Total nodes: 267, SitePage nodes: 2 (use --verbose for breakdown)
3:27:20 PM: success createPages - 0.005s
3:27:20 PM: success Checking for changed pages - 0.000s
3:27:20 PM: success createPagesStatefully - 0.092s
3:27:20 PM: success Cleaning up stale page-data - 0.001s
3:27:20 PM: success update schema - 0.017s
3:27:20 PM: success onPreExtractQueries - 0.000s
3:27:21 PM: success extract queries from components - 0.502s
3:27:21 PM: success write out redirect data - 0.001s
3:27:21 PM: vips_value_hash: no case for NULL
3:27:21 PM: type 64, gchararray
3:27:21 PM: generic 53, GParamString
3:27:21 PM: vips_value_hash: no case for 0.000000
3:27:21 PM: type 60, gdouble
3:27:21 PM: generic 109, GParamDouble
3:27:21 PM: vips_value_hash: no case for FALSE
3:27:21 PM: type 20, gboolean
3:27:21 PM: generic 76, GParamBoolean
3:27:21 PM: vips_value_hash: no case for ((VipsAccess) VIPS_ACCESS_RANDOM)
3:27:21 PM: type 81740352, VipsAccess
3:27:21 PM: generic 80, GParamEnum
3:27:21 PM: vips_value_hash: no case for FALSE
3:27:21 PM: type 20, gboolean
3:27:21 PM: generic 76, GParamBoolean
3:27:22 PM: ​
3:27:22 PM: ────────────────────────────────────────────────────────────────
3:27:22 PM: "build.command" failed
3:27:22 PM: ────────────────────────────────────────────────────────────────
3:27:22 PM: ​
3:27:22 PM: Error message
3:27:22 PM: Command was killed with SIGSEGV (Segmentation fault): gatsby build
3:27:22 PM: ​
3:27:22 PM: Error location
3:27:22 PM: In Build command from Netlify app:
3:27:22 PM: gatsby build
3:27:22 PM: ​
3:27:22 PM: Resolved config
3:27:22 PM: build:
3:27:22 PM: command: gatsby build
3:27:22 PM: commandOrigin: ui
3:27:22 PM: publish: /opt/build/repo/public
3:27:22 PM: Caching artifacts
3:27:22 PM: Started saving node modules
3:27:22 PM: Finished saving node modules
3:27:22 PM: Started saving build plugins
3:27:22 PM: Finished saving build plugins
3:27:22 PM: Started saving pip cache
3:27:22 PM: Finished saving pip cache
3:27:22 PM: Started saving emacs cask dependencies
3:27:22 PM: Finished saving emacs cask dependencies
3:27:22 PM: Started saving maven dependencies
3:27:22 PM: Finished saving maven dependencies
3:27:22 PM: Started saving boot dependencies
3:27:22 PM: Finished saving boot dependencies
3:27:22 PM: Started saving rust rustup cache
3:27:22 PM: Finished saving rust rustup cache
3:27:22 PM: Started saving rust cargo bin cache
3:27:22 PM: Finished saving rust cargo bin cache
3:27:22 PM: Started saving go dependencies
3:27:23 PM: Finished saving go dependencies
3:27:23 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
3:27:23 PM: Failing build: Failed to build site
3:27:23 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
3:27:23 PM: Finished processing build request in 1m26.932707149s
Package.json
{
"scripts": {
"analyze:lint": "eslint --ext .jsx --ext .js .",
"analyze:prettier": "prettier --list-different \"**/*.{css,js,jsx,json,md}\"",
"analyze": "npm run analyze:lint && npm run analyze:prettier",
"fix:lint": "eslint --ext .jsx --ext .js . --fix",
"fix:prettier": "prettier --write \"**/*.{css,js,jsx,json,md}\"",
"fix": "npm run fix:lint && npm run fix:prettier",
"build": "gatsby build",
"develop": "gatsby develop --open",
"dev": "npm run develop",
"start": "npm run develop",
"serve": "gatsby serve",
"clean": "gatsby clean",
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
},
"dependencies": {
"babel-plugin-styled-components": "^1.10.7",
"gatsby": "^2.29.2",
"gatsby-image": "^2.8.0",
"gatsby-image-background-slider": "0.0.4",
"gatsby-plugin-google-analytics": "^2.3.17",
"gatsby-plugin-hotjar": "^1.1.1",
"gatsby-plugin-layout": "^1.7.0",
"gatsby-plugin-manifest": "2.4.1",
"gatsby-plugin-offline": "3.2.0",
"gatsby-plugin-postcss": "^3.4.0",
"gatsby-plugin-react-helmet": "3.7.0",
"gatsby-plugin-sharp": "^2.11.2",
"gatsby-plugin-sitemap": "^2.9.0",
"gatsby-plugin-styled-components": "^3.3.1",
"gatsby-plugin-web-font-loader": "^1.0.4",
"gatsby-source-filesystem": "^2.3.29",
"gatsby-transformer-sharp": "^2.9.0",
"postcss": "^8.2.1",
"prop-types": "15.7.2",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-helmet": "6.0.0",
"react-intersection-observer": "^8.26.2",
"react-player": "^2.0.1",
"react-select": "^3.1.0",
"react-spring": "^8.0.27",
"styled-components": "^5.1.0"
},
"devDependencies": {
"#tailwindcss/custom-forms": "0.2.1",
"autoprefixer": "^9.0.0",
"babel-eslint": "10.1.0",
"cssnano": "4.1.10",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.11.0",
"eslint-loader": "3.0.4",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-react": "7.19.0",
"gatsby-plugin-eslint": "2.0.8",
"prettier": "2.0.5",
"react-moment": "^0.9.7",
"tailwindcss": "^2.0.2"
},
"keywords": [
],
"license": "MIT",
"repository": {
"type": "git",
"url": ""
}
}
Fix:
yarn upgrade gatsby-plugin-manifest#latest gatsby-plugin-sharp#latest
How I got here:
Found a post on Netlify forums from the OP - Netlify states that this is related to the VIPS dependency, outside of Netlify's control.
Found GH Issue on what's the issue for the VIPS dependency here.
From those comments, see that the fix is to upgrade the two packages above.
P.S. I also tried changing/upgrading my Node version, as an answer suggested, but that didn't work.
This kind of issue is related to mismatching versions of Node between your local environment and Netlify's one since all your packages are installed in node_modules based on your Node version and Netlify's does the same so, there are a couple of things you can do to fix it:
Reverse your last changes of package-lock.json or yarn-lock.json to get the previous working version. Once it's done, remove your node_modules folder and reinstall your dependencies again.
Setting the same version of Node in both environments; you can use node -v locally to get your working version there (assuming that is building properly in your local machine) and manage the build dependencies to set the same version in Netlify's side.
Force the manual upgrade of the dependencies by running:
yarn upgrade gatsby-plugin-manifest#latest gatsby-plugin-sharp#latest
Test the local environment by using netlify-cli will be helpful to check where the issue is located

File structure and scripts for deploying next js app to netlify

Pretty new to useing Next JS and combined information from various tutorials, but stuck on what I am doing wrong with either file structure or the build process in general in order to have a successful deployment to Netlify.
In the nextjs tutorial they have you put pages in /pages directory at the root. But most tutorials with webpack have you put them in another directory, the /src. well for now I don't need to worry about webpack and just want to deploy the site.
Followed this tutorial https://medium.com/#azizhk/next-js-netlify-c246ea070ae2
in my package.json i have
"scripts": {
"dev": "next",
"build": "next build && next export",
"start": "serve ./out"
},
My Build Settings in Netlify
Where the build went wrong
6:32:04 PM: Error running command: Build script returned non-zero exit code: 127
6:32:04 PM: Failing build: Failed to build site
6:32:04 PM: failed during stage 'building site': Build script returned non-zero exit code: 127
Updated directory structure
Full notes of errors from build
6:31:16 PM: Build ready to start
6:31:30 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
6:31:30 PM: build-image tag: v3.3.2
6:31:30 PM: buildbot version: 8727aab446158e7b8c8ad2e96fe74b0154505a4e
6:31:30 PM: Fetching cached dependencies
6:31:31 PM: Starting to download cache of 2.0MB
6:31:31 PM: Finished downloading cache in 158.159923ms
6:31:31 PM: Starting to extract cache
6:31:31 PM: Finished extracting cache in 24.261695ms
6:31:31 PM: Finished fetching cache in 184.056316ms
6:31:31 PM: Starting to prepare the repo for build
6:31:31 PM: Preparing Git Reference refs/heads/master
6:31:32 PM: Starting build script
6:31:32 PM: Installing dependencies
6:31:33 PM: Downloading and installing node v10.16.3...
6:31:34 PM: Downloading https://nodejs.org/dist/v10.16.3/node-v10.16.3-linux-x64.tar.xz...
6:31:34 PM:
######################
6:31:34 PM: 31.2%
6:31:34 PM:
##################################################################
6:31:34 PM: 92.1%
6:31:34 PM:
########################################################################
6:31:34 PM: 100.0%
6:31:34 PM: Computing checksum with sha256sum
6:31:34 PM: Checksums matched!
6:31:38 PM: Now using node v10.16.3 (npm v6.9.0)
6:31:38 PM: Attempting ruby version 2.6.2, read from environment
6:31:39 PM: Using ruby version 2.6.2
6:31:39 PM: Using PHP version 5.6
6:31:39 PM: Started restoring cached node modules
6:31:39 PM: Finished restoring cached node modules
6:31:40 PM: Installing NPM modules using NPM version 6.9.0
6:31:59 PM: > core-js#2.6.10 postinstall /opt/build/repo/node_modules/core-js
6:31:59 PM: > node postinstall || echo "ignore"
6:31:59 PM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
6:31:59 PM: The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
6:31:59 PM: > https://opencollective.com/core-js
6:31:59 PM: > https://www.patreon.com/zloirock
6:31:59 PM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
6:31:59 PM: > styled-components#4.4.0 postinstall /opt/build/repo/node_modules/styled-components
6:31:59 PM: > node ./scripts/postinstall.js || exit 0
6:31:59 PM: Use styled-components at work? Consider supporting our development efforts at https://opencollective.com/styled-components
6:32:00 PM: npm WARN
6:32:00 PM: cityguide#1.0.0 No description
6:32:00 PM: npm WARN cityguide#1.0.0 No repository field.
6:32:00 PM: npm
6:32:00 PM: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/fsevents):
6:32:00 PM: npm WARN
6:32:00 PM: notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
6:32:00 PM: added 1014 packages from 493 contributors and audited 19416 packages in 19.734s
6:32:00 PM: found 0 vulnerabilities
6:32:00 PM: NPM modules installed
6:32:01 PM: Started restoring cached go cache
6:32:01 PM: Finished restoring cached go cache
6:32:01 PM: unset GOOS;
6:32:01 PM: unset GOARCH;
6:32:01 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
6:32:01 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
6:32:01 PM: go version >&2;
6:32:01 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
6:32:01 PM: go version go1.12 linux/amd64
6:32:01 PM: Installing missing commands
6:32:01 PM: Verify run directory
6:32:01 PM: Executing user command: yarn build
6:32:01 PM: /usr/local/bin/build: line 60: yarn: command not found
6:32:01 PM: Skipping functions preparation step: no functions directory set
6:32:01 PM: Caching artifacts
6:32:01 PM: Started saving node modules
6:32:01 PM: Finished saving node modules
6:32:01 PM: Started saving pip cache
6:32:01 PM: Finished saving pip cache
6:32:01 PM: Started saving emacs cask dependencies
6:32:01 PM: Finished saving emacs cask dependencies
6:32:01 PM: Started saving maven dependencies
6:32:01 PM: Finished saving maven dependencies
6:32:01 PM: Started saving boot dependencies
6:32:01 PM: Finished saving boot dependencies
6:32:01 PM: Started saving go dependencies
6:32:01 PM: Finished saving go dependencies
6:32:04 PM: Error running command: Build script returned non-zero exit code: 127
6:32:04 PM: Failing build: Failed to build site
6:32:04 PM: failed during stage 'building site': Build script returned non-zero exit code: 127
6:32:04 PM: Finished processing build request in 33.478673773s
You can use below script to deploy your app in netlify
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start",
"export": "next export",
"deploy": "yarn run build && yarn run export"
},
Here are netlify build settings.
If you are using npm then please write npm instead of yarn.

Resources