The build log didn’t load in the first post, so here’s what it looks like up until the first infinite loop:
11:55:02 AM: 1. @netlify/plugin-gatsby (onPreBuild event)
11:55:02 AM: ────────────────────────────────────────────────────────────────
11:55:02 AM:
11:55:02 AM: No Gatsby cache found. Building fresh.
11:55:02 AM: Add gatsby-plugin-netlify
to gatsby-config.js
if you would like to support Gatsby redirects. 
11:55:02 AM:
11:55:02 AM: (@netlify/plugin-gatsby onPreBuild completed in 13ms)
11:55:02 AM:
11:55:02 AM: ────────────────────────────────────────────────────────────────
11:55:02 AM: 2. Build command from Netlify app
11:55:02 AM: ────────────────────────────────────────────────────────────────
11:55:02 AM:
11:55:02 AM: $ npm run build
11:55:02 AM: > jodie@0.1.5 build /opt/build/repo
11:55:02 AM: > npm run build
11:55:03 AM: > jodie@0.1.5 build /opt/build/repo
11:55:03 AM: > npm run build
11:55:03 AM: > jodie@0.1.5 build /opt/build/repo
11:55:03 AM: > npm run build
11:55:03 AM: > jodie@0.1.5 build /opt/build/repo
11:55:03 AM: > npm run build
11:55:03 AM: > jodie@0.1.5 build /opt/build/repo
11:55:03 AM: > npm run build
11:55:04 AM: > jodie@0.1.5 build /opt/build/repo
11:55:04 AM: > npm run build
11:55:04 AM: > jodie@0.1.5 build /opt/build/repo
11:55:04 AM: > npm run build
11:55:04 AM: > jodie@0.1.5 build /opt/build/repo
11:55:04 AM: > npm run build
11:55:04 AM: > jodie@0.1.5 build /opt/build/repo
11:55:04 AM: > npm run build
11:55:05 AM: > jodie@0.1.5 build /opt/build/repo
11:55:05 AM: > npm run build
11:55:05 AM: > jodie@0.1.5 build /opt/build/repo
11:55:05 AM: > npm run build
11:55:05 AM: > jodie@0.1.5 build /opt/build/repo
11:55:05 AM: > npm run build
11:55:05 AM: > jodie@0.1.5 build /opt/build/repo
11:55:05 AM: > npm run build
Once that runs for awhile, it picks back up here and hits another loop:
11:57:25 AM: > npm run build
11:57:34 AM: /opt/build-bin/build: line 92: 1598 Killed FORCE_COLOR=1 “$netlify_build_node_bin” “$netlify_build_bin” --cwd="$repository_root" --repositoryRoot="$repository_root" --branch="$branch" --siteId="$site_id" --defaultConfig="$default_config" --baseRelDir="$base_rel_dir" --context="$context" --node-path="$user_node_path" --cachedConfigPath="$cached_netlify_build_config_file" --api-host="$netlify_endpoint" --token="$netlify_token" --build-id="$BUILD_ID" --deploy-id="$DEPLOY_ID" --mode=“buildbot” --telemetry="$build_telemetry" --send-status --save-config --statsd.host="$STATSD_HOST" --statsd.port="$STATSD_PORT" --functions-dist-dir="$functions_dist_dir" --cache-dir="$cache_dir" --buildbot-server-socket="$buildbot_server_socket" --framework="$framework" --feature-flags="$feature_flags" --testOpts.silentLingeringProcesses="$SILENT_LINGERING_PROCESSES"
11:57:34 AM: Caching artifacts
11:57:34 AM: Started saving node modules
11:57:34 AM: Finished saving node modules
11:57:34 AM: Started saving build plugins
11:57:34 AM: Finished saving build plugins
11:57:34 AM: Started saving pip cache
11:57:34 AM: Finished saving pip cache
11:57:34 AM: Started saving emacs cask dependencies
11:57:34 AM: Finished saving emacs cask dependencies
11:57:34 AM: Started saving maven dependencies
11:57:34 AM: Finished saving maven dependencies
11:57:34 AM: Started saving boot dependencies
11:57:34 AM: Finished saving boot dependencies
11:57:34 AM: Started saving rust rustup cache
11:57:34 AM: Finished saving rust rustup cache
11:57:34 AM: Started saving go dependencies
11:57:34 AM: Finished saving go dependencies
11:57:34 AM: > jodie@0.1.5 build /opt/build/repo
11:57:34 AM: > npm run build
11:57:34 AM: > jodie@0.1.5 build /opt/build/repo
11:57:34 AM: > npm run build
11:57:35 AM: > jodie@0.1.5 build /opt/build/repo
11:57:35 AM: > npm run build
11:57:35 AM: > jodie@0.1.5 build /opt/build/repo
11:57:35 AM: > npm run build
11:57:35 AM: > jodie@0.1.5 build /opt/build/repo
11:57:35 AM: > npm run build
11:57:36 AM: npm WARN lifecycle npm is using /opt/buildhome/.nvm/versions/node/v12.18.0/bin/node but there is no node binary in the current PATH. Use the --scripts-prepend-node-path
option to include the path for the node binary npm was executed with.
11:57:36 AM: > jodie@0.1.5 build /opt/build/repo
11:57:36 AM: > npm run build
11:57:36 AM: sh: 1: npm: not found
11:57:36 AM: npm ERR! code ELIFECYCLE
11:57:36 AM: npm ERR! syscall spawn
11:57:36 AM: npm ERR! file sh
11:57:36 AM: npm ERR! errno ENOENT
11:57:36 AM: npm ERR! jodie@0.1.5 build: npm run build
11:57:36 AM: npm ERR! spawn ENOENT
11:57:36 AM: npm ERR!
11:57:36 AM: npm ERR! Failed at the jodie@0.1.5 build script.
11:57:36 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
11:57:36 AM: npm WARN Local package.json exists, but node_modules missing, did you mean to install?
11:57:36 AM: npm ERR! A complete log of this run can be found in:
11:57:36 AM: npm ERR! /opt/buildhome/.npm/_logs/2022-01-21T19_57_36_147Z-debug.log
11:57:36 AM: npm ERR! code ELIFECYCLE
11:57:36 AM: npm ERR! errno 1
11:57:36 AM: npm ERR! jodie@0.1.5 build: npm run build
11:57:36 AM: npm ERR! Exit status 1
11:57:36 AM: npm ERR!
11:57:36 AM: npm ERR! Failed at the jodie@0.1.5 build script.
11:57:36 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
11:57:36 AM: npm WARN Local package.json exists, but node_modules missing, did you mean to install?
11:57:36 AM: npm ERR! A complete log of this run can be found in:
11:57:36 AM: npm ERR! /opt/buildhome/.npm/_logs/2022-01-21T19_57_36_160Z-debug.log
11:57:36 AM: npm ERR! code ELIFECYCLE
11:57:36 AM: npm ERR! errno 1
11:57:36 AM: npm ERR! jodie@0.1.5 build: npm run build
11:57:36 AM: npm ERR! Exit status 1
11:57:36 AM: npm ERR!
11:57:36 AM: npm ERR! Failed at the jodie@0.1.5 build script.
11:57:36 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
11:57:36 AM: npm WARN Local package.json exists, but node_modules missing, did you mean to install?
11:57:36 AM: npm ERR! A complete log of this run can be found in:
11:57:36 AM: npm ERR! /opt/buildhome/.npm/_logs/2022-01-21T19_57_36_171Z-debug.log
11:57:36 AM: npm ERR! code ELIFECYCLE
11:57:36 AM: npm ERR! errno 1
11:57:36 AM: npm ERR! jodie@0.1.5 build: npm run build
11:57:36 AM: npm ERR! Exit status 1
11:57:36 AM: npm ERR!
11:57:36 AM: npm ERR! Failed at the jodie@0.1.5 build script.
11:57:36 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
11:57:36 AM: npm WARN Local package.json exists, but node_modules missing, did you mean to install?
11:57:36 AM: npm ERR! A complete log of this run can be found in:
11:57:36 AM: npm ERR! /opt/buildhome/.npm/_logs/2022-01-21T19_57_36_190Z-debug.log
11:57:36 AM: npm ERR! code ELIFECYCLE
11:57:36 AM: npm ERR! errno 1
11:57:36 AM: npm ERR! jodie@0.1.5 build: npm run build
11:57:36 AM: npm ERR! Exit status 1
11:57:36 AM: npm ERR!
11:57:36 AM: npm ERR! Failed at the jodie@0.1.5 build script.
11:57:36 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
11:57:36 AM: npm WARN Local package.json exists, but node_modules missing, did you mean to install?
11:57:36 AM: npm ERR! A complete log of this run can be found in:
11:57:36 AM: npm ERR! /opt/buildhome/.npm/_logs/2022-01-21T19_57_36_202Z-debug.log
11:57:36 AM: npm ERR! code ELIFECYCLE
11:57:36 AM: npm ERR! errno 1
11:57:36 AM: npm ERR! jodie@0.1.5 build: npm run build
11:57:36 AM: npm ERR! Exit status 1
And this is the end of the log:
11:57:53 AM: npm ERR! Failed at the jodie@0.1.5 build script.
11:57:53 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
11:57:53 AM: npm WARN Local package.json exists, but node_modules missing, did you mean to install?
11:57:53 AM: npm ERR! A complete log of this run can be found in:
11:57:53 AM: npm ERR! /opt/buildhome/.npm/_logs/2022-01-21T19_57_45_655Z-debug.log
11:57:53 AM: Error running command: Build script returned non-zero exit code: 137
11:57:53 AM: Failing build: Failed to build site
11:57:53 AM: Finished processing build request in 3m59.019452786s