I’ve tried changing npm run build to gatsby build under the build command. Tried deleting the package-lock.json and npm installing. I’m not sure what is wrong.
11:25:59 PM: Build ready to start
11:26:02 PM: build-image version: d2c6dbeac570350a387d832f64bc980dc964ad65 (focal)
11:26:02 PM: build-image tag: v4.8.0
11:26:02 PM: buildbot version: 0475eccc4c4863180929fe6d58b546f8277ad384
11:26:02 PM: Fetching cached dependencies
11:26:02 PM: Failed to fetch cache, continuing with build
11:26:02 PM: Starting to prepare the repo for build
11:26:02 PM: No cached dependencies found. Cloning fresh repo
11:26:02 PM: git clone https://github.com/AdamJWatt88/Portfolio
11:26:09 PM: Preparing Git Reference refs/heads/main
11:26:11 PM: Parsing package.json dependencies
11:26:12 PM: Starting build script
11:26:12 PM: Installing dependencies
11:26:12 PM: Python version set to 2.7
11:26:13 PM: v16.14.2 is already installed.
11:26:13 PM: Now using node v16.14.2 (npm v8.5.0)
11:26:13 PM: Started restoring cached build plugins
11:26:13 PM: Finished restoring cached build plugins
11:26:13 PM: Attempting ruby version 2.7.2, read from environment
11:26:14 PM: Using ruby version 2.7.2
11:26:15 PM: Using PHP version 8.0
11:26:15 PM: No npm workspaces detected
11:26:15 PM: Started restoring cached node modules
11:26:15 PM: Finished restoring cached node modules
11:26:15 PM: Installing NPM modules using NPM version 8.5.0
11:26:28 PM: npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
11:26:28 PM: npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
11:26:28 PM: npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
11:26:28 PM: npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
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: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:31 PM: npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
11:26:36 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:38 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:45 PM: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
11:27:06 PM: added 1736 packages, and audited 1737 packages in 50s
11:27:06 PM: 300 packages are looking for funding
11:27:06 PM: run `npm fund` for details
11:27:06 PM: 27 vulnerabilities (6 moderate, 21 high)
11:27:06 PM: To address issues that do not require attention, run:
11:27:06 PM: npm audit fix
11:27:06 PM: To address all issues possible (including breaking changes), run:
11:27:06 PM: npm audit fix --force
11:27:06 PM: Some issues need review, and may require choosing
11:27:06 PM: a different dependency.
11:27:06 PM: Run `npm audit` for details.
11:27:06 PM: NPM modules installed
11:27:07 PM: Started restoring cached go cache
11:27:07 PM: Finished restoring cached go cache
11:27:07 PM: go version go1.16.5 linux/amd64
11:27:07 PM: go version go1.16.5 linux/amd64
11:27:07 PM: Installing missing commands
11:27:07 PM: Verify run directory
11:27:08 PM:
11:27:08 PM: ────────────────────────────────────────────────────────────────
11:27:08 PM: Netlify Build
11:27:08 PM: ────────────────────────────────────────────────────────────────
11:27:08 PM:
11:27:08 PM: ❯ Version
11:27:08 PM: @netlify/build 26.5.1
11:27:08 PM:
11:27:08 PM: ❯ Flags
11:27:08 PM: baseRelDir: true
11:27:08 PM: buildId: 62493df71efb4d0009cc797b
11:27:08 PM: deployId: 62493df71efb4d0009cc797d
11:27:08 PM:
11:27:08 PM: ❯ Current directory
11:27:08 PM: /opt/build/repo
11:27:08 PM:
11:27:08 PM: ❯ Config file
11:27:08 PM: No config file was defined: using default values.
11:27:08 PM:
11:27:08 PM: ❯ Context
11:27:08 PM: production
11:27:08 PM:
11:27:08 PM: ❯ Installing plugins
11:27:08 PM: - @netlify/plugin-gatsby@2.1.4
11:27:24 PM:
11:27:24 PM: ❯ Loading plugins
11:27:24 PM: - @netlify/plugin-gatsby@2.1.4 from Netlify app
11:27:26 PM:
11:27:26 PM: ────────────────────────────────────────────────────────────────
11:27:26 PM: 1. @netlify/plugin-gatsby (onPreBuild event)
11:27:26 PM: ────────────────────────────────────────────────────────────────
11:27:26 PM:
11:27:26 PM: No Gatsby cache found. Building fresh.
11:27:26 PM: public [
11:27:26 PM: '231-6c7686233521f2e51162.js',
11:27:26 PM: '231-6c7686233521f2e51162.js.map',
11:27:26 PM: '404',
11:27:26 PM: '404.html',
11:27:26 PM: '610-ca5a7ca4b5c96f2532cd.js',
11:27:26 PM: '610-ca5a7ca4b5c96f2532cd.js.map',
11:27:26 PM: '711-5066f7f08e8850abc870.js',
11:27:26 PM: '711-5066f7f08e8850abc870.js.map',
11:27:26 PM: '_headers',
11:27:26 PM: 'app-79bec0a09714eab1471b.js',
11:27:26 PM: 'app-79bec0a09714eab1471b.js.map',
11:27:26 PM: 'chunk-map.json',
11:27:26 PM: 'component---src-pages-404-js-b17238dc335abea93be9.js',
11:27:26 PM: 'component---src-pages-404-js-b17238dc335abea93be9.js.map',
11:27:26 PM: 'component---src-pages-index-js-4075ec8f0ac0e00c5ef9.js',
11:27:26 PM: 'component---src-pages-index-js-4075ec8f0ac0e00c5ef9.js.map',
11:27:26 PM: 'favicon.ico',
11:27:26 PM: 'framework-675a07cb9aff63570c38.js',
11:27:26 PM: 'framework-675a07cb9aff63570c38.js.LICENSE.txt',
11:27:26 PM: 'framework-675a07cb9aff63570c38.js.map',
11:27:26 PM: 'index.html',
11:27:26 PM: 'page-data',
11:27:26 PM: 'polyfill-82df740e7cad994d0af0.js',
11:27:26 PM: 'polyfill-82df740e7cad994d0af0.js.map',
11:27:26 PM: 'static',
11:27:26 PM: 'styles.c094860727bdfdf6beec.css',
11:27:26 PM: 'webpack-runtime-344d236a307f8752779c.js',
11:27:26 PM: 'webpack-runtime-344d236a307f8752779c.js.map',
11:27:26 PM: 'webpack.stats.json'
11:27:26 PM: ]
11:27:26 PM: /opt/build/repo/.cache [
11:27:26 PM: '.eslintrc.json',
11:27:26 PM: '.nf-skip-gatsby-functions',
11:27:26 PM: '.parcel-cache',
11:27:26 PM: '_this_is_virtual_fs_path_',
11:27:26 PM: 'api-runner-browser-plugins.js',
11:27:26 PM: 'api-runner-browser.js',
11:27:26 PM: 'api-runner-ssr.js',
11:27:26 PM: 'api-ssr-docs.js',
11:27:26 PM: 'app.js',
11:27:26 PM: 'async-requires.js',
11:27:26 PM: 'babelState.json',
11:27:26 PM: 'blank.css',
11:27:26 PM: 'caches',
11:27:26 PM: 'caches-lmdb',
11:27:26 PM: 'commonjs',
11:27:26 PM: 'css-to-object.js',
11:27:26 PM: 'data',
11:27:26 PM: 'debug-log.js',
11:27:26 PM: 'default-html.js',
11:27:26 PM: 'dev-404-page.js',
11:27:26 PM: 'dev-loader.js',
11:27:26 PM: 'develop-html',
11:27:26 PM: 'develop-static-entry.js',
11:27:26 PM: 'dummy.js',
11:27:26 PM: 'emitter.js',
11:27:26 PM: 'ensure-resources.js',
11:27:26 PM: 'error-overlay-handler.js',
11:27:26 PM: 'fast-refresh-overlay',
11:27:26 PM: 'find-path.js',
11:27:26 PM: 'functions',
11:27:26 PM: 'gatsby-browser-entry.js',
11:27:26 PM: 'loader.js',
11:27:26 PM: 'loading-indicator',
11:27:26 PM: 'match-paths.json',
11:27:26 PM: 'navigation.js',
11:27:26 PM: 'normalize-page-path.js',
11:27:26 PM: 'page-renderer.js',
11:27:26 PM: 'page-ssr',
11:27:26 PM: 'pages.json',
11:27:26 PM: 'polyfill-entry.js',
11:27:26 PM: 'prefetch.js',
11:27:26 PM: 'production-app.js',
11:27:26 PM: 'public-page-renderer-dev.js',
11:27:26 PM: 'public-page-renderer-prod.js',
11:27:26 PM: 'public-page-renderer.js',
11:27:26 PM: 'query-engine',
11:27:26 PM: 'query-result-store.js',
11:27:26 PM: 'react-lifecycles-compat.js',
11:27:26 PM: 'redirect-utils.js',
11:27:26 PM: 'redirects.json',
11:27:26 PM: 'redux',
11:27:26 PM: 'register-service-worker.js',
11:27:26 PM: 'root.js',
11:27:26 PM: 'route-announcer-props.js',
11:27:26 PM: 'schema.gql',
11:27:26 PM: 'server-utils',
11:27:26 PM: 'shadow-portal.js',
11:27:26 PM: 'socketIo.js',
11:27:26 PM: 'ssr-builtin-trackers',
11:27:26 PM: 'ssr-develop-static-entry.js',
11:27:26 PM: 'static-entry.js',
11:27:26 PM: 'strip-prefix.js',
11:27:26 PM: 'sync-requires.js',
11:27:26 PM: 'test-require-error.js',
11:27:26 PM: 'tmp-2441-IJvhQUECQPKQ',
11:27:26 PM: 'tmp-2441-QyuKApt1OcXY',
11:27:26 PM: 'webpack',
11:27:26 PM: 'worker'
11:27:26 PM: ]
11:27:26 PM:
11:27:26 PM: (@netlify/plugin-gatsby onPreBuild completed in 24ms)
11:27:26 PM:
11:27:26 PM: ────────────────────────────────────────────────────────────────
11:27:26 PM: 2. Build command from Netlify app
11:27:30 PM: Creating deploy upload records
11:27:26 PM: ────────────────────────────────────────────────────────────────
11:27:26 PM:
11:27:26 PM: $ npm run build
11:27:26 PM: > gatsby-starter-hello-world@0.1.0 build
11:27:26 PM: > gatsby build
11:27:29 PM: error There was an unhandled error during compilation for /opt/build/repo. Please run the command with the --verbose flag again.
11:27:31 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
11:27:29 PM:
11:27:29 PM:
11:27:29 PM: Error: std::bad_alloc
11:27:29 PM:
11:27:29 PM: not finished compile gatsby files - 0.120s
11:27:29 PM:
11:27:29 PM: ────────────────────────────────────────────────────────────────
11:27:29 PM: "build.command" failed
11:27:29 PM: ────────────────────────────────────────────────────────────────
11:27:29 PM:
11:27:29 PM: Error message
11:27:29 PM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
11:27:29 PM:
11:27:29 PM: Error location
11:27:29 PM: In Build command from Netlify app:
11:27:29 PM: npm run build
11:27:29 PM:
11:27:29 PM: Resolved config
11:27:29 PM: build:
11:27:29 PM: command: npm run build
11:27:29 PM: commandOrigin: ui
11:27:29 PM: publish: /opt/build/repo/public
11:27:29 PM: publishOrigin: ui
11:27:29 PM: headers:
11:27:29 PM: - for: /*
values:
Referrer-Policy: same-origin
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
- for: /component---src-pages-404-js-b17238dc335abea93be9.js
values:
Cache-Control: public, max-age=31536000, immutable
- for: /styles.c094860727bdfdf6beec.css
values:
Cache-Control: public, max-age=31536000, immutable
- for: /component---src-pages-index-js-4075ec8f0ac0e00c5ef9.js
values:
Cache-Control: public, max-age=31536000, immutable
- for: /webpack-runtime-344d236a307f8752779c.js
values:
Cache-Control: public, max-age=31536000, immutable
- for: /framework-675a07cb9aff63570c38.js
values:
Cache-Control: public, max-age=31536000, immutable
- for: /app-79bec0a09714eab1471b.js
values:
Cache-Control: public, max-age=31536000, immutable
- for: /static/*
values:
Cache-Control: public, max-age=31536000, immutable
- for: /sw.js
values:
Cache-Control: no-cache
- for: /404/
values:
Link: </webpack-runtime-344d236a307f8752779c.js>; rel=preload; as=script, </framework-675a07cb9aff63570c38.js>; rel=preload; as=script, </app-79bec0a09714eab1471b.js>; rel=preload; as=script, </component---src-pages-404-js-b17238dc335abea93be9.js>; rel=preload; as=script, </page-data/app-data.json>; rel=preload; as=fetch; crossorigin, </page-data/404/page-data.json>; rel=preload; as=fetch; crossorigin
- for: /404.html
values:
Link: </webpack-runtime-344d236a307f8752779c.js>; rel=preload; as=script, </framework-675a07cb9aff63570c38.js>; rel=preload; as=script, </app-79bec0a09714eab1471b.js>; rel=preload; as=script, </component---src-pages-404-js-b17238dc335abea93be9.js>; rel=preload; as=script, </page-data/app-data.json>; rel=preload; as=fetch; crossorigin, </page-data/404.html/page-data.json>; rel=preload; as=fetch; crossorigin
- for: /
values:
Link: </webpack-runtime-344d236a307f8752779c.js>; rel=preload; as=script, </framework-675a07cb9aff63570c38.js>; rel=preload; as=script, </app-79bec0a09714eab1471b.js>; rel=preload; as=script, </component---src-pages-index-js-4075ec8f0ac0e00c5ef9.js>; rel=preload; as=script, </page-data/app-data.json>; rel=preload; as=fetch; crossorigin, </page-data/index/page-data.json>; rel=preload; as=fetch; crossorigin
plugins:
- inputs: {}
origin: ui
package: '@netlify/plugin-gatsby'
Caching artifacts
11:27:29 PM: Started saving node modules
11:27:29 PM: Finished saving node modules
11:27:29 PM: Started saving build plugins
11:27:29 PM: Finished saving build plugins
11:27:29 PM: Started saving pip cache
11:27:29 PM: Finished saving pip cache
11:27:29 PM: Started saving emacs cask dependencies
11:27:29 PM: Finished saving emacs cask dependencies
11:27:29 PM: Started saving maven dependencies
11:27:29 PM: Finished saving maven dependencies
11:27:29 PM: Started saving boot dependencies
11:27:29 PM: Finished saving boot dependencies
11:27:29 PM: Started saving rust rustup cache
11:27:29 PM: Finished saving rust rustup cache
11:27:29 PM: Started saving go dependencies
11:27:29 PM: Finished saving go dependencies
11:27:30 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:27:31 PM: Failing build: Failed to build site
11:27:31 PM: Finished processing build request in 1m29.048285201s