title: Netlify Deployment Failure: Failed during 'building site': Build script returned non-zero exit code: 1
body: <p>I am having issues building my site. Everything works when I use Gatsby Serve and Gatsby Build does not throw me any errors. I wish I had more details but unfortunately, this error code doesn't really say anything. </p>
  
  <p>I do not have a netlify.toml or yarn.lock in this project. So I can't delete those as other solutions suggest. </p>
  
  <p>I have tried deleting the package-lock.json and node modules for a fresh NPM install with no luck.</p>
  
  <p>I don't think the security vulnerabilities are the issue but I am not sure. I had this happen awhile back and found it was NPM giving me these issues but my fixes for that did not work this time either. </p>
  
  <pre><code>2:11:24 PM: [feature enabled]: Nitro deploys enabled. Buckle up! ⚡️
  2:11:24 PM: Build ready to start
  2:11:26 PM: build-image version: 9cade8af58c2cf3a17a1e9433d2e979149488837
  2:11:26 PM: build-image tag: v3.3.5
  2:11:26 PM: buildbot version: 6fd888c8d66fd09bb18f09e1728e11fbc555b868
  2:11:26 PM: Fetching cached dependencies
  2:11:26 PM: Starting to download cache of 188.9MB
  2:11:27 PM: Finished downloading cache in 1.47346303s
  2:11:27 PM: Starting to extract cache
  2:11:35 PM: Finished extracting cache in 7.599019035s
  2:11:35 PM: Finished fetching cache in 9.2055103s
  2:11:35 PM: Starting to prepare the repo for build
  2:11:36 PM: Preparing Git Reference refs/heads/master
  2:11:37 PM: Starting build script
  2:11:37 PM: Installing dependencies
  2:11:37 PM: Started restoring cached node version
  2:11:40 PM: Finished restoring cached node version
  2:11:40 PM: v10.19.0 is already installed.
  2:11:43 PM: Now using node v10.19.0 (npm v6.13.4)
  2:11:43 PM: Attempting ruby version 2.6.2, read from environment
  2:11:44 PM: Using ruby version 2.6.2
  2:11:45 PM: Using PHP version 5.6
  2:11:45 PM: Started restoring cached node modules
  2:11:45 PM: Finished restoring cached node modules
  2:11:45 PM: Installing NPM modules using NPM version 6.13.4
  2:12:03 PM: npm
  2:12:03 PM:  WARN rm
  2:12:03 PM:  not removing /opt/build/repo/node_modules/.bin/gatsby as it wasn't installed by /opt/build/repo/node_modules/gatsby
  2:12:05 PM: &gt; gatsby-cli@2.9.0 postinstall /opt/build/repo/node_modules/gatsby-cli
  2:12:05 PM: &gt; node scripts/postinstall.js
  2:12:05 PM: &gt; gatsby@2.19.22 postinstall /opt/build/repo/node_modules/gatsby
  2:12:05 PM: &gt; node scripts/postinstall.js
  2:12:06 PM: &gt; install-peers@1.0.3 postinstall /opt/build/repo/node_modules/install-peers
  2:12:06 PM: &gt; node install.js
  2:12:06 PM: Unable to find peerDependencies in /opt/build/repo
  2:12:08 PM: npm
  2:12:08 PM: WARN tsutils@3.17.1 requires a peer of typescript@&gt;=2.8.0 || &gt;= 3.2.0-dev || &gt;= 3.3.0-dev || &gt;= 3.4.0-dev || &gt;= 3.5.0-dev || &gt;= 3.6.0-dev || &gt;= 3.6.0-beta || &gt;= 3.7.0-dev || &gt;= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
  2:12:08 PM: npm WARN
  2:12:08 PM: optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/chokidar/node_modules/fsevents):
  2:12:08 PM: npm WARN
  2:12:08 PM:  notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
  2:12:08 PM: npm WARN
  2:12:08 PM:  optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/fsevents):
  2:12:08 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
  2:12:08 PM: added 93 packages from 905 contributors, removed 34 packages, updated 121 packages and audited 31851 packages in 22.308s
  2:12:10 PM: 108 packages are looking for funding
  2:12:10 PM:   run `npm fund` for details
  2:12:10 PM: found 9 high severity vulnerabilities
  2:12:10 PM:   run `npm audit fix` to fix them, or `npm audit` for details
  2:12:10 PM: NPM modules installed
  2:12:11 PM: Started restoring cached go cache
  2:12:11 PM: Finished restoring cached go cache
  2:12:11 PM: unset GOOS;
  2:12:11 PM: unset GOARCH;
  2:12:11 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
  2:12:11 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
  2:12:11 PM: go version &gt;&amp;2;
  2:12:11 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
  2:12:11 PM: go version go1.12 linux/amd64
  2:12:11 PM: Installing missing commands
  2:12:11 PM: Verify run directory
  2:12:11 PM: Executing user command: gatsby build
  2:12:13 PM: success open and validate gatsby-configs - 0.035s
  2:12:15 PM: success load plugins - 1.430s
  2:12:15 PM: success onPreInit - 0.012s
  2:12:15 PM: success delete html and css files from previous builds - 0.015s
  2:12:15 PM: success initialize cache - 0.009s
  2:12:15 PM: success copy gatsby files - 0.032s
  2:12:15 PM: success onPreBootstrap - 0.004s
  2:12:15 PM: success createSchemaCustomization - 0.017s
  2:12:15 PM: success source and transform nodes - 0.145s
  2:12:15 PM: success building schema - 0.371s
  2:12:15 PM: success createPages - 0.047s
  2:12:15 PM: success createPagesStatefully - 0.064s
  2:12:15 PM: success onPreExtractQueries - 0.000s
  2:12:15 PM: success update schema - 0.032s
  2:12:16 PM: success extract queries from components - 0.454s
  2:12:16 PM: success write out requires - 0.004s
  2:12:16 PM: success write out redirect data - 0.001s
  2:12:16 PM: success Build manifest and related icons - 0.267s
  2:12:16 PM: success onPostBootstrap - 0.268s
  2:12:16 PM: ⠀
  2:12:16 PM: info bootstrap finished - 5.299 s
  2:12:16 PM: ⠀
  2:12:38 PM: failed Building production JavaScript and CSS bundles - 21.747s
  2:12:38 PM: error Generating JavaScript bundles failed
  2:12:38 PM: Can't resolve '../components/Content' in '/opt/build/repo/src/templates'
  2:12:38 PM: not finished run queries - 22.139s
  2:12:38 PM: not finished Generating image thumbnails - 22.118s
  2:12:39 PM: Skipping functions preparation step: no functions directory set
  2:12:39 PM: Caching artifacts
  2:12:39 PM: Started saving node modules
  2:12:39 PM: Finished saving node modules
  2:12:39 PM: Started saving pip cache
  2:12:39 PM: Finished saving pip cache
  2:12:39 PM: Started saving emacs cask dependencies
  2:12:39 PM: Finished saving emacs cask dependencies
  2:12:39 PM: Started saving maven dependencies
  2:12:39 PM: Finished saving maven dependencies
  2:12:39 PM: Started saving boot dependencies
  2:12:39 PM: Finished saving boot dependencies
  2:12:39 PM: Started saving go dependencies
  2:12:39 PM: Finished saving go dependencies
  2:12:39 PM: Error running command: Build script returned non-zero exit code: 1
  2:12:39 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
  2:12:39 PM: Failing build: Failed to build site
  2:12:39 PM: Finished processing build request in 1m13.33817169s
  </code></pre>