Gatsby: Generating JavaScript bundles failed on Gatsby v2.17+

Created on 29 Oct 2019  路  11Comments  路  Source: gatsbyjs/gatsby

Description

After updating Gatsby from 2.16.5 to 2.17.0+ I no longer can build my project. 'gatsby develop' is working.

Steps to reproduce

Name one page is Cyrillic, for example '褌械褋褌' and the project won't build.

Link to the repo
It's on the gatsby_2.17.0 branch.

Actual result

failed Building production JavaScript and CSS bundles - 12.821s

 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

Can't resolve '..srcpages褌械褋褌.js' in 'C:\Work\gatsby\.cache'

File: .cache\async-requires.js

not finished run queries - 13.382s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `gatsby build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\pantaley.stoyanov\AppData\Roaming\npm-cache\_logs\2019-10-29T09_23_38_222Z-debug.log

Environment

System:
    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
  Binaries:
    npm: 6.12.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.18362.449.0
  npmPackages:
    gatsby: ^2.17.6 => 2.17.6
    gatsby-image: ^2.2.30 => 2.2.30
    gatsby-plugin-manifest: ^2.2.25 => 2.2.25
    gatsby-plugin-offline: ^3.0.17 => 3.0.17
    gatsby-plugin-react-helmet: ^3.1.13 => 3.1.13
    gatsby-plugin-sharp: ^2.2.34 => 2.2.34
    gatsby-source-filesystem: ^2.1.35 => 2.1.35
    gatsby-transformer-sharp: ^2.3.1 => 2.3.1
needs reproduction

Most helpful comment

Hi!
I cloned your repo and can't reproduce the problem. gatsby build works fine for me. Please delete your .cache and public folder and try again. If that doesn't work delete your package-lock.json and node_modules and try a npm install again.

All 11 comments

Still exist in v2.17.8

Hi!
I cloned your repo and can't reproduce the problem. gatsby build works fine for me. Please delete your .cache and public folder and try again. If that doesn't work delete your package-lock.json and node_modules and try a npm install again.

@LekoArts sorry I forgot to mention that is on the gatsby_2.17.0 branch https://github.com/pantaley/gatsby/tree/gatsby_2.17.0

Master is for other issue.

I used that branch :) Please try my steps and report back.

@LekoArts

  • made a fresh clone of the repo
  • went to the branch git checkout gatsby_2.17.0 where is "gatsby": "^2.17.6"
  • deleted package-lock.json
  • npm install
  • npm run build

And here is a screenshot of the error:
image

@LekoArts I can confirm that with WSL everything is working, but the issue is there with git bash terminal.

You can close the issue if git bash is not a priority. For everyone else who have the same issue can setup a WSL.

Should be fixed in gatsby 2.17.17. Feel free to re-open if it's not (and mention me)!

Hi!
I cloned your repo and can't reproduce the problem. gatsby build works fine for me. Please delete your .cache and public folder and try again. If that doesn't work delete your package-lock.json and node_modules and try a npm install again.

This worked. Sometimes as we code, we tend to forget that the environment that we try to fix is too infected with all of the fixes we are trying to implement. Starting at clean slate did the trick and thanks for this post!

Hi!
I cloned your repo and can't reproduce the problem. gatsby build works fine for me. Please delete your .cache and public folder and try again. If that doesn't work delete your package-lock.json and node_modules and try a npm install again.

I'm having the same problem. And it didn't work for me

I'm having the same problem.

oh okay, sorry. This worked

Was this page helpful?
0 / 5 - 0 ratings

Related issues

theduke picture theduke  路  3Comments

brandonmp picture brandonmp  路  3Comments

ghost picture ghost  路  3Comments

dustinhorton picture dustinhorton  路  3Comments

ferMartz picture ferMartz  路  3Comments