Gatsby: failed Building production JavaScript and CSS bundles,ERROR #98123 WEBPACK

Created on 14 Dec 2020  路  17Comments  路  Source: gatsbyjs/gatsby

I lost my entire day searching solution for ERROR #98123 WEBPACK when building gatsby site .
I found it's due to case-sensitive in the components, and tried many times changing name case of all compenents.
But getting,
failed Building production JavaScript and CSS bundles - 0.095s

ERROR #98123 WEBPACK

undefined failed

Cannot read property 'includes' of undefined

The issues similar to this doesn't giving an accurate solution, so please provide a solution else it should be better to move to other react frameworks.

needs reproduction bug

All 17 comments

Hi!

Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.

If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.

Thanks for using Gatsby! 馃挏

Website: https://github.com/anto-pv/Portfolio.git
It is running in locally without any errors.
But when doing, netlify deploy or gatsby build, it's showing:
............................................
`success run static queries - 0.015s - 1/1 68.59/s
success write out requires - 0.007s
failed Building production JavaScript and CSS bundles - 0.104s

ERROR #98123 WEBPACK

undefined failed

Cannot read property 'includes' of undefined`

Website: https://github.com/anto-pv/Portfolio.git
It is running in locally without any errors.
But when doing, netlify deploy or gatsby build, it's showing:
............................................
`success run static queries - 0.015s - 1/1 68.59/s
success write out requires - 0.007s
failed Building production JavaScript and CSS bundles - 0.104s

ERROR #98123 WEBPACK

undefined failed

Cannot read property 'includes' of undefined`

did you solve the problem ? I'm having the same problem.

I'm also only having this issue on Netlify and not locally

I'm also only having this issue on Netlify and not locally

I also get this problem on Netlify. I couldn't solve the problem for 2 days. Local is also running the project, but I get this error when I build at locally.

I don't found the solution yet, then I tried with gh-pages using Gatsby Deploy github actions and it worked for me.

Same problem as @ibrahimgediktr. gatsby develop is building the site just fine, gatsby build gives me the same error pasted below:

failed Building production JavaScript and CSS bundles - 0.102s
error undefined failed

Cannot read property 'includes' of undefined

Same problem as @ibrahimgediktr. gatsby develop is building the site just fine, gatsby build gives me the same error pasted below:

failed Building production JavaScript and CSS bundles - 0.102s
error undefined failed

Cannot read property 'includes' of undefined

Try gatsby build, may be your code was wrong ,or if that's building site fine then try using github actions

I did try gatsby-build. I'm developing locally, when I run gatsby-develop the website build correctly without any errors. When I try gatsby-build it throws this error at the "Building production JavaScript and CSS bundles" step. I tried deploying to Netlify and running build, got the same error.

Attaching screenshots of the output logs when using gatsby-develop:
Screen Shot 2020-12-22 at 9 40 19 AM

Attaching screenshots of the output logs when using gatsby-build:
Screen Shot 2020-12-22 at 9 40 53 AM

Info about my build environment
Screen Shot 2020-12-22 at 9 41 21 AM

Updated npm and install gatsby-cli globally. Getting this error now. Making some progress! Any suggestions for this issue?

Screen Shot 2020-12-22 at 9 46 02 AM

Updated npm and install gatsby-cli globally. Getting this error now. Making some progress! Any suggestions for this issue?

Screen Shot 2020-12-22 at 9 46 02 AM

I tried every way but it didn't work, I deleted my node module and package-lock.json file but it didn't work, I had to created the project again, I completely deleted and rebuilt the project, and I didn't get any errors.

Ok I'll give that a shot. Can you post your gatsby-info here? Thanks

Ok I'll give that a shot. Can you post your gatsby-info here? Thanks
Here

Ads谋z

Found the issue! I went through package.json line by line and removed all the packages that weren't necessary. Webpack was included for some reason. Able to run develop and build without any issues now.

Found the issue! I went through package.json line by line and removed all the packages that weren't necessary. Webpack was included for some reason. Able to run develop and build without any issues now.

I'm glad you solved the problem, but I still don't know what caused the real problem.

I had this issue as well after using npm-check-updates to upgrade everything. This had moved my webpack dependency to 5.11.0. Going back to webpack@4 has solved the issue for me.

Not working: [email protected]
Working: [email protected]

I had this issue as well after using npm-check-updates to upgrade everything. This had moved my webpack dependency to 5.11.0. Going back to webpack@4 has solved the issue for me.

Not working: [email protected]
Working: [email protected]

yes, I updated the version of the webpack in the old project, and it works, the cause of the issue was webpack, Thanks Matt 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dustinhorton picture dustinhorton  路  3Comments

rossPatton picture rossPatton  路  3Comments

signalwerk picture signalwerk  路  3Comments

ghost picture ghost  路  3Comments

benstr picture benstr  路  3Comments