title: Debug failing Gatsby build on Netlify (Can't resolve component)
body: <p>Site runs fine in Development. Site Github repo is connected to Netlify. When pushing changes the build is failing with Netlify.</p>
  
  <p>It looks as if some of my components aren't resolving properly in the build phase. But resolve fine in development.</p>
  
  <p>Trimmed down logs below, starting at where things start to fail:</p>
  
  <pre><code>1:30:26 PM: failed Building production JavaScript and CSS bundles - 24.846s
  1:30:26 PM: error Generating JavaScript bundles failed
  1:30:26 PM: Can't resolve '../components/SEO' in '/opt/build/repo/src/pages'
  1:30:26 PM: error Generating JavaScript bundles failed
  1:30:26 PM: Can't resolve '../components/SEO' in '/opt/build/repo/src/pages'
  1:30:26 PM: error Generating JavaScript bundles failed
  1:30:26 PM: Can't resolve '../components/SEO' in '/opt/build/repo/src/pages'
  1:30:26 PM: error Generating JavaScript bundles failed
  1:30:26 PM: Can't resolve '../components/SEO' in '/opt/build/repo/src/pages'
  1:30:26 PM: error Generating JavaScript bundles failed
  1:30:26 PM: Can't resolve '../components/SEO' in '/opt/build/repo/src/pages'
  1:30:26 PM: error Generating JavaScript bundles failed
  1:30:26 PM: Can't resolve '../components/SEO' in '/opt/build/repo/src/templates'
  1:30:26 PM: error Generating JavaScript bundles failed
  1:30:26 PM: Can't resolve '../components/Section' in '/opt/build/repo/src/layout'
  1:30:26 PM: error Generating JavaScript bundles failed
  1:30:26 PM: Can't resolve '../components/Section' in '/opt/build/repo/src/pages'
  1:30:26 PM: error Generating JavaScript bundles failed
  1:30:26 PM: Can't resolve '../components/Section' in '/opt/build/repo/src/pages'
  1:30:26 PM: error Generating JavaScript bundles failed
  1:30:26 PM: Can't resolve '../components/Section' in '/opt/build/repo/src/pages'
  1:30:26 PM: error Generating JavaScript bundles failed
  1:30:26 PM: Can't resolve '../components/Section' in '/opt/build/repo/src/pages'
  1:30:26 PM: error Generating JavaScript bundles failed
  1:30:26 PM: Can't resolve '../components/Section' in '/opt/build/repo/src/pages'
  1:30:26 PM: error Generating JavaScript bundles failed
  1:30:26 PM: Can't resolve '../components/Section' in '/opt/build/repo/src/templates'
  1:30:26 PM: not finished run queries - 24.930s
  1:30:26 PM: not finished Generating image thumbnails - 24.909s
  1:30:26 PM: Skipping functions preparation step: no functions directory set
  1:30:26 PM: Caching artifacts
  1:30:26 PM: Started saving node modules
  1:30:26 PM: Finished saving node modules
  1:30:26 PM: Started saving pip cache
  1:30:26 PM: Finished saving pip cache
  1:30:26 PM: Started saving emacs cask dependencies
  1:30:27 PM: Finished saving emacs cask dependencies
  1:30:27 PM: Started saving maven dependencies
  1:30:27 PM: Finished saving maven dependencies
  1:30:27 PM: Started saving boot dependencies
  1:30:27 PM: Finished saving boot dependencies
  1:30:27 PM: Started saving go dependencies
  1:30:27 PM: Finished saving go dependencies
  1:30:29 PM: Error running command: Build script returned non-zero exit code: 1
  1:30:30 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
  1:30:29 PM: Failing build: Failed to build site
  1:30:30 PM: Finished processing build request in 1m56.320874616s
  </code></pre>
  
  <p><a href="https://pastebin.com/ZQ0wTp9c" rel="nofollow noreferrer">Full log here</a></p>