The site runs fine on localhost.
Error
Command failed with exit code 1: npm run build
netlify site name
admirable-hamster-c142d9
Environment variables:
Build log:
3:14:02 PM: Build ready to start
3:14:20 PM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
3:14:20 PM: build-image tag: v4.10.1
3:14:20 PM: buildbot version: 67e75f1ba713a8213d4b5a8ccf9708af751e2390
3:14:20 PM: Building without cache
3:14:20 PM: Starting to prepare the repo for build
3:14:21 PM: No cached dependencies found. Cloning fresh repo
3:14:21 PM: git clone [email protected]:bernardost/spo01-dd01
3:14:23 PM: Preparing Git Reference refs/heads/master
3:14:24 PM: Parsing package.json dependencies
3:14:25 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'public' versus '/' in the Netlify UI
3:14:25 PM: Different functions path detected, going to use the one specified in the Netlify configuration file: 'netlify/functions' versus '' in the Netlify UI
3:14:25 PM: Different build command detected, going to use the one specified in the Netlify configuration file: 'npm run build' versus '' in the Netlify UI
3:14:25 PM: Starting build script
3:14:25 PM: Installing dependencies
3:14:25 PM: Python version set to 2.7
3:14:25 PM: Downloading and installing node v14.15.0...
3:14:25 PM: Downloading https://nodejs.org/dist/v14.15.0/node-v14.15.0-linux-x64.tar.xz...
3:14:26 PM: Computing checksum with sha256sum
3:14:26 PM: Checksums matched!
3:14:28 PM: Now using node v14.15.0 (npm v6.14.8)
3:14:28 PM: Started restoring cached build plugins
3:14:28 PM: Finished restoring cached build plugins
3:14:28 PM: Attempting ruby version 2.7.2, read from environment
3:14:29 PM: Using ruby version 2.7.2
3:14:29 PM: Using PHP version 8.0
3:14:29 PM: No npm workspaces detected
3:14:29 PM: Started restoring cached node modules
3:14:29 PM: Finished restoring cached node modules
3:14:29 PM: Installing NPM modules using NPM version 6.14.8
3:14:30 PM: npm WARN using --force I sure hope you know what you are doing.
3:14:57 PM: npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
3:14:57 PM: > [email protected] install /opt/build/repo/node_modules/msgpackr-extract
3:14:57 PM: > node-gyp-build-optional-packages
3:14:57 PM: > [email protected] install /opt/build/repo/node_modules/lmdb
3:14:57 PM: > node-gyp-build-optional-packages
3:14:57 PM: > [email protected] install /opt/build/repo/node_modules/lmdb-store
3:14:57 PM: > node-gyp-build
3:14:58 PM: > [email protected] install /opt/build/repo/node_modules/sharp
3:14:58 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
3:15:00 PM: sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.11.3/libvips-8.11.3-linux-x64.tar.br
3:15:01 PM: > [email protected] postinstall /opt/build/repo/node_modules/babel-polyfill/node_modules/core-js
3:15:01 PM: > node -e "try{require('./postinstall')}catch(e){}"
3:15:01 PM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
3:15:01 PM: The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
3:15:01 PM: > https://opencollective.com/core-js
3:15:01 PM: > https://www.patreon.com/zloirock
3:15:01 PM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
3:15:01 PM: > [email protected] postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
3:15:01 PM: > node -e "try{require('./postinstall')}catch(e){}"
3:15:01 PM: > [email protected] postinstall /opt/build/repo/node_modules/core-js
3:15:01 PM: > node -e "try{require('./postinstall')}catch(e){}"
3:15:01 PM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
3:15:01 PM: The project needs your help! Please consider supporting of core-js:
3:15:01 PM: > https://opencollective.com/core-js
3:15:01 PM: > https://patreon.com/zloirock
3:15:01 PM: > https://paypal.me/zloirock
3:15:01 PM: > bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz
3:15:01 PM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
3:15:01 PM: > [email protected] postinstall /opt/build/repo/node_modules/core-js-pure
3:15:01 PM: > node -e "try{require('./postinstall')}catch(e){}"
3:15:02 PM: > [email protected] postinstall /opt/build/repo/node_modules/gatsby-telemetry
3:15:02 PM: > node src/postinstall.js || true
3:15:02 PM: > [email protected] postinstall /opt/build/repo/node_modules/gatsby/node_modules/gatsby-cli
3:15:02 PM: > node scripts/postinstall.js
3:15:02 PM: > [email protected] postinstall /opt/build/repo/node_modules/gatsby
3:15:02 PM: > node scripts/postinstall.js
3:15:03 PM: npm WARN [email protected] No repository field.
3:15:03 PM: added 2147 packages from 2173 contributors and audited 2150 packages in 33.192s
3:15:04 PM: 299 packages are looking for funding
3:15:04 PM: run `npm fund` for details
3:15:04 PM: found 74 vulnerabilities (23 moderate, 41 high, 10 critical)
3:15:04 PM: run `npm audit fix` to fix them, or `npm audit` for details
3:15:04 PM: NPM modules installed
3:15:04 PM: Started restoring cached go cache
3:15:04 PM: Finished restoring cached go cache
3:15:04 PM: Installing Go version 1.17 (requested 1.17)
3:15:09 PM: unset GOOS;
3:15:09 PM: unset GOARCH;
3:15:09 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.17.linux.amd64';
3:15:09 PM: export PATH="/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}";
3:15:09 PM: go version >&2;
3:15:09 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.17.linux.amd64.env"
3:15:09 PM: go version go1.17 linux/amd64
3:15:09 PM: Installing missing commands
3:15:09 PM: Verify run directory
3:15:10 PM: โ
3:15:10 PM: โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
3:15:10 PM: Netlify Build
3:15:10 PM: โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
3:15:10 PM: โ
3:15:10 PM: โฏ Version
3:15:10 PM: @netlify/build 27.16.1
3:15:10 PM: โ
3:15:10 PM: โฏ Flags
3:15:10 PM: baseRelDir: true
3:15:10 PM: buildId: 6312019a9e0ce300916f9a2e
3:15:10 PM: deployId: 6312019a9e0ce300916f9a30
3:15:10 PM: โ
3:15:10 PM: โฏ Current directory
3:15:10 PM: /opt/build/repo
3:15:10 PM: โ
3:15:10 PM: โฏ Config file
3:15:10 PM: /opt/build/repo/netlify.toml
3:15:10 PM: โ
3:15:10 PM: โฏ Context
3:15:10 PM: production
3:15:10 PM: โ
3:15:10 PM: โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
3:15:10 PM: 1. build.command from netlify.toml
3:15:10 PM: โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
3:15:10 PM: โ
3:15:10 PM: $ npm run build
3:15:10 PM: > [email protected] build /opt/build/repo
3:15:10 PM: > npm run clean && gatsby build
3:15:11 PM: > [email protected] clean /opt/build/repo
3:15:11 PM: > gatsby clean
3:15:11 PM: info Deleting .cache, public, /opt/build/repo/node_modules/.cache/babel-loader, /opt/build/repo/node_modules/.cache/terser-webpack-plugin
3:15:11 PM: info Successfully deleted directories
3:15:14 PM: success open and validate gatsby-configs, load plugins - 1.015s
3:15:14 PM: success onPreInit - 0.004s
3:15:14 PM: success initialize cache - 0.173s
3:15:14 PM: success copy gatsby files - 0.055s
3:15:15 PM: success Compiling Gatsby Functions - 0.229s
3:15:15 PM: success onPreBootstrap - 0.236s
3:15:15 PM: success createSchemaCustomization - 0.007s
3:15:16 PM: success Checking for changed pages - 0.000s
3:15:16 PM: success source and transform nodes - 1.385s
3:15:17 PM: info Writing GraphQL type definitions to /opt/build/repo/.cache/schema.gql
3:15:19 PM: success building schema - 2.623s
3:15:19 PM: error Your site's "gatsby-node.js" created a page with a component that doesn't exist.
3:15:19 PM: The path to the missing component is "/opt/build/repo/src/templates/insight-post.js"
3:15:19 PM: The page object passed to createPage:
3:15:19 PM: {
3:15:19 PM: "path": "/insights/2022-08-12-insight-1-title/",
3:15:19 PM: "tags": null,
3:15:19 PM: "component": "/opt/build/repo/src/templates/insight-post.js",
3:15:19 PM: "context": {
3:15:19 PM: "id": "4eb67a7f-ea8e-521a-8208-8fe116b86926"
3:15:19 PM: }
3:15:19 PM: }
3:15:19 PM: See the documentation for the "createPage" action โ https://www.gatsbyjs.com/docs/reference/config-files/actions#createPage
3:15:19 PM: not finished createPages - 0.398s
3:15:19 PM: npm ERR! code ELIFECYCLE
3:15:19 PM: npm ERR! errno 1
3:15:19 PM: npm ERR! [email protected] build: `npm run clean && gatsby build`
3:15:19 PM: npm ERR! Exit status 1
3:15:19 PM: npm ERR!
3:15:19 PM: npm ERR! Failed at the [email protected] build script.
3:15:19 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
3:15:20 PM: npm ERR! A complete log of this run can be found in:
3:15:20 PM: npm ERR! /opt/buildhome/.npm/_logs/2022-09-02T13_15_19_956Z-debug.log
3:15:20 PM: โ
3:15:20 PM: โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
3:15:20 PM: "build.command" failed
3:15:20 PM: โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
3:15:20 PM: โ
3:15:20 PM: Error message
3:15:20 PM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
3:15:20 PM: โ
3:15:20 PM: Error location
3:15:20 PM: In build.command from netlify.toml:
3:15:20 PM: npm run build
3:15:20 PM: โ
3:15:20 PM: Resolved config
3:15:20 PM: build:
3:15:20 PM: command: npm run build
3:15:20 PM: commandOrigin: config
3:15:20 PM: environment:
3:15:20 PM: - CI
3:15:20 PM: - NODE_VERSION
3:15:20 PM: - NPM_FLAGS
3:15:20 PM: - YARN_VERSION
3:15:20 PM: - YARN_FLAGS
3:15:20 PM: publish: /opt/build/repo/public
3:15:20 PM: publishOrigin: config
3:15:20 PM: functionsDirectory: /opt/build/repo/netlify/functions
3:15:20 PM: Caching artifacts
3:15:20 PM: Started saving node modules
3:15:20 PM: Finished saving node modules
3:15:20 PM: Started saving build plugins
3:15:20 PM: Finished saving build plugins
3:15:20 PM: Started saving pip cache
3:15:20 PM: internal/modules/cjs/loader.js:883
3:15:20 PM: throw err;
3:15:20 PM: ^
3:15:20 PM: Error: Cannot find module './node-api-is-supported'
3:15:20 PM: Require stack:
3:15:20 PM: - /opt/build/repo/node_modules/gatsby-plugin-utils/dist/index.js
3:15:20 PM: - /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/validate.js
3:15:20 PM: - /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/load.js
3:15:20 PM: - /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/index.js
3:15:20 PM: - /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-config-and-plugins.js
3:15:20 PM: - /opt/build/repo/node_modules/gatsby/dist/services/initialize.js
3:15:20 PM: - /opt/build/repo/node_modules/gatsby/dist/services/index.js
3:15:20 PM: - /opt/build/repo/node_modules/gatsby/dist/utils/worker/child/queries.js
3:15:20 PM: - /opt/build/repo/node_modules/gatsby/dist/utils/worker/child/index.js
3:15:20 PM: - /opt/build/repo/node_modules/gatsby-worker/dist/child.js
3:15:20 PM: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
3:15:20 PM: at Function.Module._load (internal/modules/cjs/loader.js:725:27)
3:15:20 PM: at Module.require (internal/modules/cjs/loader.js:952:19)
3:15:20 PM: at require (/opt/build/repo/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
3:15:20 PM: at Object.<anonymous> (/opt/build/repo/node_modules/gatsby-plugin-utils/dist/index.js:29:27)
3:15:20 PM: at Module._compile (/opt/build/repo/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
3:15:20 PM: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
3:15:20 PM: at Module.load (internal/modules/cjs/loader.js:928:32)
3:15:20 PM: at Function.Module._load (internal/modules/cjs/loader.js:769:14)
3:15:20 PM: at Module.require (internal/modules/cjs/loader.js:952:19)
3:15:20 PM: at require (/opt/build/repo/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
3:15:20 PM: at Object.<anonymous> (/opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/validate.js:24:26)
3:15:20 PM: at Module._compile (/opt/build/repo/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
3:15:20 PM: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
3:15:20 PM: at Module.load (internal/modules/cjs/loader.js:928:32)
3:15:20 PM: at Function.Module._load (internal/modules/cjs/loader.js:769:14) {
3:15:20 PM: code: 'MODULE_NOT_FOUND',
3:15:20 PM: requireStack: [
3:15:20 PM: '/opt/build/repo/node_modules/gatsby-plugin-utils/dist/index.js',
3:15:20 PM: '/opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/validate.js',
3:15:20 PM: '/opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/load.js',
3:15:20 PM: '/opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/index.js',
3:15:20 PM: '/opt/build/repo/node_modules/gatsby/dist/bootstrap/load-config-and-plugins.js',
3:15:20 PM: '/opt/build/repo/node_modules/gatsby/dist/services/initialize.js',
3:15:20 PM: '/opt/build/repo/node_modules/gatsby/dist/services/index.js',
3:15:20 PM: '/opt/build/repo/node_modules/gatsby/dist/utils/worker/child/queries.js',
3:15:20 PM: '/opt/build/repo/node_modules/gatsby/dist/utils/worker/child/index.js',
3:15:20 PM: '/opt/build/repo/node_modules/gatsby-worker/dist/child.js'
3:15:20 PM: ]
3:15:20 PM: }
3:15:21 PM: Finished saving pip cache
3:15:21 PM: Started saving emacs cask dependencies
3:15:21 PM: Finished saving emacs cask dependencies
3:15:21 PM: Started saving maven dependencies
3:15:21 PM: Finished saving maven dependencies
3:15:21 PM: Started saving boot dependencies
3:15:21 PM: Finished saving boot dependencies
3:15:21 PM: Started saving rust rustup cache
3:15:21 PM: Finished saving rust rustup cache
3:15:21 PM: Started saving go dependencies
3:15:21 PM: Finished saving go dependencies
3:15:22 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
3:15:22 PM: Creating deploy upload records
3:15:22 PM: Failing build: Failed to build site
3:15:22 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
3:15:22 PM: Finished processing build request in 1m2.298012196s
netlify.toml
[build]
publish = "public"
command = "npm run build"
[build.environment]
NODE_VERSION = "14.15.0"
YARN_VERSION = "1.22.4"
YARN_FLAGS = "--no-ignore-optional"
Both the โ2022-08-12-insight-1-titleโ page and the โinsight-post.jsโ component were deleted a long time ago, so Iโm not sure why this error is there.
Sorry, Iโm not a developer so I may be missing something pretty obvious!
Thank you!