Gatsby: Pushing to netlify gatsby website error

Created on 17 Nov 2019  Â·  1Comment  Â·  Source: gatsbyjs/gatsby

I want to push my website written in gatsby to the netlify but I have this error. Any ideas how can I fix this problem? :/

3:29:21 PM: Build ready to start
3:29:24 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
3:29:24 PM: build-image tag: v3.3.2
3:29:24 PM: buildbot version: a2bab682ae0761baa4d123ebd00c57be933655dc
3:29:25 PM: Fetching cached dependencies
3:29:25 PM: Failed to fetch cache, continuing with build
3:29:25 PM: Starting to prepare the repo for build
3:29:25 PM: No cached dependencies found. Cloning fresh repo
3:29:25 PM: git clone https://github.com/lukaszkalemba/mercedes-benz
3:29:26 PM: Preparing Git Reference refs/heads/master
3:29:27 PM: Starting build script
3:29:27 PM: Installing dependencies
3:29:28 PM: Downloading and installing node v10.17.0...
3:29:28 PM: Downloading https://nodejs.org/dist/v10.17.0/node-v10.17.0-linux-x64.tar.xz...
3:29:29 PM:

#

3:29:29 PM: ############ 88.3%
3:29:29 PM:

#

3:29:29 PM: #################################### 100.0%
3:29:29 PM: Computing checksum with sha256sum
3:29:29 PM: Checksums matched!
3:29:31 PM: Now using node v10.17.0 (npm v6.11.3)
3:29:32 PM: Attempting ruby version 2.6.2, read from environment
3:29:33 PM: Using ruby version 2.6.2
3:29:33 PM: Using PHP version 5.6
3:29:33 PM: Started restoring cached node modules
3:29:33 PM: Finished restoring cached node modules
3:29:34 PM: Installing NPM modules using NPM version 6.11.3
3:30:05 PM: > [email protected] install /opt/build/repo/node_modules/gatsby-plugin-sharp/node_modules/sharp
3:30:05 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
3:30:06 PM: info
3:30:06 PM: sharp
3:30:06 PM: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.8.1/libvips-8.8.1-linux-x64.tar.gz
3:30:08 PM: > [email protected] install /opt/build/repo/node_modules/gatsby-transformer-sharp/node_modules/sharp
3:30:08 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
3:30:08 PM: info
3:30:08 PM: sharp
3:30:08 PM: Using cached /opt/buildhome/.npm/_libvips/libvips-8.8.1-linux-x64.tar.gz
3:30:10 PM: > [email protected] install /opt/build/repo/node_modules/sharp
3:30:10 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
3:30:10 PM: info
3:30:10 PM: sharp
3:30:10 PM: Using cached /opt/buildhome/.npm/_libvips/libvips-8.8.1-linux-x64.tar.gz
3:30:12 PM: > [email protected] postinstall /opt/build/repo/node_modules/core-js
3:30:12 PM: > node postinstall || echo "ignore"
3:30:12 PM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
3:30:12 PM: The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
3:30:12 PM: > https://opencollective.com/core-js
3:30:12 PM: > https://www.patreon.com/zloirock
3:30:12 PM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
3:30:12 PM: > [email protected] postinstall /opt/build/repo/node_modules/gatsby-telemetry
3:30:12 PM: > node src/postinstall.js
3:30:12 PM: > [email protected] postinstall /opt/build/repo/node_modules/cwebp-bin
3:30:12 PM: > node lib/install.js
3:30:13 PM: ✔ cwebp pre-build test passed successfully
3:30:13 PM: > [email protected] postinstall /opt/build/repo/node_modules/mozjpeg
3:30:13 PM: > node lib/install.js
3:30:13 PM: ✔ mozjpeg pre-build test passed successfully
3:30:13 PM: > [email protected] postinstall /opt/build/repo/node_modules/pngquant-bin
3:30:13 PM: > node lib/install.js
3:30:14 PM: ✔ pngquant pre-build test passed successfully
3:30:14 PM: > [email protected] postinstall /opt/build/repo/node_modules/gatsby/node_modules/gatsby-cli
3:30:14 PM: > node scripts/postinstall.js
3:30:14 PM: > [email protected] postinstall /opt/build/repo/node_modules/gatsby
3:30:14 PM: > node scripts/postinstall.js
3:30:14 PM: > [email protected] postinstall /opt/build/repo/node_modules/styled-components
3:30:14 PM: > node ./scripts/postinstall.js || exit 0
3:30:15 PM: Use styled-components at work? Consider supporting our development efforts at https://opencollective.com/styled-components
3:30:17 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
3:30:17 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
3:30:17 PM: npm
3:30:17 PM: WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/chokidar/node_modules/fsevents):
3:30:17 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
3:30:17 PM: added 2001 packages from 992 contributors and audited 26108 packages in 42.713s
3:30:17 PM: found 0 vulnerabilities
3:30:17 PM: NPM modules installed
3:30:18 PM: Started restoring cached go cache
3:30:18 PM: Finished restoring cached go cache
3:30:18 PM: unset GOOS;
3:30:18 PM: unset GOARCH;
3:30:18 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
3:30:18 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
3:30:18 PM: go version >&2;
3:30:18 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
3:30:18 PM: go version go1.12 linux/amd64
3:30:18 PM: Installing missing commands
3:30:18 PM: Verify run directory
3:30:18 PM: Executing user command: gatsby build
3:30:21 PM: success open and validate gatsby-configs - 0.034s
3:30:22 PM: success load plugins - 0.806s
3:30:22 PM: success onPreInit - 0.015s
3:30:22 PM: success delete html and css files from previous builds - 0.015s
3:30:22 PM: success initialize cache - 0.012s
3:30:22 PM: success copy gatsby files - 0.044s
3:30:22 PM: success onPreBootstrap - 0.008s
3:30:22 PM: success source and transform nodes - 0.211s
3:30:22 PM: success building schema - 0.364s
3:30:22 PM: success createPages - 0.001s
3:30:22 PM: success createPagesStatefully - 0.083s
3:30:23 PM: success onPreExtractQueries - 0.004s
3:30:23 PM: success update schema - 0.039s
3:30:23 PM: success extract queries from components - 0.562s
3:30:23 PM: success write out requires - 0.004s
3:30:23 PM: success write out redirect data - 0.001s
3:30:23 PM: success onPostBootstrap - 0.001s
3:30:23 PM: â €
3:30:23 PM: info bootstrap finished - 5.512 s
3:30:23 PM: â €
3:31:24 PM: failed Building production JavaScript and CSS bundles - 58.323s
3:31:24 PM: error Generating JavaScript bundles failed
3:31:24 PM: Can't resolve 'components/SubTitle' in '/opt/build/repo/src/components'
3:31:24 PM: error Generating JavaScript bundles failed
3:31:24 PM: Can't resolve 'components/SubTitle' in '/opt/build/repo/src/components'
3:31:24 PM: error Generating JavaScript bundles failed
3:31:24 PM: Can't resolve 'components/SubTitle' in '/opt/build/repo/src/templates/home'
3:31:24 PM: not finished run queries - 61.175s
3:31:24 PM: not finished Generating image thumbnails - 61.201s
3:31:25 PM: Skipping functions preparation step: no functions directory set
3:31:25 PM: Caching artifacts
3:31:25 PM: Started saving node modules
3:31:25 PM: Finished saving node modules
3:31:25 PM: Started saving pip cache
3:31:25 PM: Finished saving pip cache
3:31:25 PM: Started saving emacs cask dependencies
3:31:25 PM: Finished saving emacs cask dependencies
3:31:25 PM: Started saving maven dependencies
3:31:25 PM: Finished saving maven dependencies
3:31:25 PM: Started saving boot dependencies
3:31:25 PM: Finished saving boot dependencies
3:31:25 PM: Started saving go dependencies
3:31:25 PM: Finished saving go dependencies
3:31:28 PM: Error running command: Build script returned non-zero exit code: 1
3:31:28 PM: Failing build: Failed to build site
3:31:28 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
3:31:28 PM: Finished processing build request in 2m3.395311912s

question or discussion

Most helpful comment

Thank you for opening this!

3:31:24 PM: Can't resolve 'components/SubTitle' in '/opt/build/repo/src/components'
3:31:24 PM: error Generating JavaScript bundles failed
3:31:24 PM: Can't resolve 'components/SubTitle' in '/opt/build/repo/src/components'
3:31:24 PM: error Generating JavaScript bundles failed
3:31:24 PM: Can't resolve 'components/SubTitle' in '/opt/build/repo/src/templates/home'

This is the important bit. You import the component with the wrong name (capitalized/uncapitalized) somewhere and/or have committed that to GitHub. Netlify runs Linux and that is case-sensitive to filenames.

We're marking this issue as answered and closing it for now but please feel free to comment here if you would like to continue this discussion. We also recommend heading over to our communities if you have questions that are not bug reports or feature requests. We hope we managed to help and thank you for using Gatsby!

>All comments

Thank you for opening this!

3:31:24 PM: Can't resolve 'components/SubTitle' in '/opt/build/repo/src/components'
3:31:24 PM: error Generating JavaScript bundles failed
3:31:24 PM: Can't resolve 'components/SubTitle' in '/opt/build/repo/src/components'
3:31:24 PM: error Generating JavaScript bundles failed
3:31:24 PM: Can't resolve 'components/SubTitle' in '/opt/build/repo/src/templates/home'

This is the important bit. You import the component with the wrong name (capitalized/uncapitalized) somewhere and/or have committed that to GitHub. Netlify runs Linux and that is case-sensitive to filenames.

We're marking this issue as answered and closing it for now but please feel free to comment here if you would like to continue this discussion. We also recommend heading over to our communities if you have questions that are not bug reports or feature requests. We hope we managed to help and thank you for using Gatsby!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rossPatton picture rossPatton  Â·  3Comments

kalinchernev picture kalinchernev  Â·  3Comments

totsteps picture totsteps  Â·  3Comments

KyleAMathews picture KyleAMathews  Â·  3Comments

Oppenheimer1 picture Oppenheimer1  Â·  3Comments