Hello,
I am facing error while deploying my gatsby site.
Site Name: elated-neumann-e38244.netlify.app
Here is build error log:
9:31:24 PM: failed Building production JavaScript and CSS bundles - 21.467s
9:31:24 PM: error Generating JavaScript bundles failed
9:31:24 PM: Cannot read property ‘split’ of undefined
Build failed due to a user error: Build script returned non-zero exit code: 2
You can check full build link
Build Settings:
These are steps i have tried so far:
- Adding environment variables NODE_VERSION to 14.15.0. This is the version on which i build on local machine.
- Adding environment variable NPM_VERSION of 6.14.8 as per my local machine where build works fine.
- Clear cache and deploy site
Hey there, @rnmKeshav
Welcome to the Netlify Forums, and thanks for reaching out!
I see you posted this a few days ago. Are you still having issues? If so, have you checked out some of our other threads on this? This one would be a good place to start
Hi @hillary, The issue is still not resolved. I am able to reproduce the error on local though.
success extract queries from components - 3.516s
success write out redirect data - 0.002s
success Build manifest and related icons - 0.055s
success onPostBootstrap - 0.059s
info bootstrap finished - 6.969s
success run page queries - 0.018s - 3/3 166.99/s
success write out requires - 0.005s
failed Building production JavaScript and CSS bundles - 10.917s
ERROR #98123 WEBPACK
Generating JavaScript bundles failed
Cannot read property 'split' of undefined
It seems Webpack issue, but i am not sure what and how to fix this.
Code is public at https://github.com/rnmKeshav/portfolio
Hey, this issue is because of warning message parsing in gatsby
. I have created an issue on gatsby. Check this link for more detail.
1 Like