-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Production Build on Netlify/Linux produce unhandled error #2501
Comments
Hmmm looks like errorStr isn't set somehow
Perhaps don't call that function from here before checking that the error array has something in it
|
To see the original error, add a console.log in build-html.js Would appreciate a PR fixing up the error reporting. |
Sure I'll give it a shot. |
@KyleAMathews I'm a bit new to Netlify and CI patterns here. Do I need to create a forked build of gatsby and use that with the Netlify build process to test during the Netlify deploy (since that's where the error occurs)? Or am I missing something? I know you can download the Netlify build environment container, but I'm not sure if that's necessary... I guess I don't know how to approach this since it only happens on Netlify's servers. |
Yeah downloading Netlify's docker image could work or you could publish your forked version of Gatsby to NPM and use that. |
Also it sounds like it's just a Linux issue so you could also try running the build process in a Linux VM. |
@KyleAMathews okay, Thanks for the feedback! I'll try to dive in some more. |
Suddenly started receiving this error after multiple successful builds. |
@Unforgiven-wanda I haven't had a chance to pull down the Netlify container and build against it locally to look at the error more in depth yet. Glad to know I'm not alone in this. I've also tried some quick fixes like reverting to specific versions of Gatsby. |
I am receiving this issue in 1.9.71 everytime there is a serverside-only bug on my mac (ie trying to access window.something). I'm having to edit the node_modules pretty consistently to get the console.log in there (everytime a package is added) to get the errors to print as expected. So for me this isn't just netlfiy, it's |
Add this PR which should help #2537 Will merge and push soon. |
Bummer. Still throws for me... Anyone else have any luck?
|
Would love one of you to debug where this is happening. I can't do much more unless I have a way to reproduce what you're seeing. |
I will try to run the Netlify container tomorrow and see if I can debug. Didn’t have time today.
- Josh
… On Oct 19, 2017, at 5:18 PM, Kyle Mathews ***@***.***> wrote:
Would love one of you to debug where this is happening. I can't do much more unless I have a way to reproduce what you're seeing.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I'm unsure if this is the actual error in this specific situation, but I found that in
webpackErrros[0] contains an object and isn't a string by itself (which in turn causes split not being available on (what was expected to be a string) errorStr ).
Instead, I tried appending The line mentioned before, got changed to the following
I'm not an experienced NodeJS developer, so someone might need to look more into if this is the actual issue - but it's definitely the issue here. As others mentioned, this was only reproducible on a Linux box; trying to import a file in all lowercase didn't give problems locally, but Linux does care, if the actual file is written in camel case (which was the given error in my situation). |
@Repox Thanks for posting this. Gave me insight on something to look for. I found a couple imports that had the improper case applied but didn't notice because I'm building locally on my mac. Once I fixed them, the Netlify build went right through. 😃 I'm setting up a Linux VM right now to try and see what can be done about the error. |
After tinkering with my Linux VM. It definitely was the Module not found error that was causing my initial pain. That being said I noticed there was a PR #2360 that was merged recently that changed to:
I tried merely reverting this change back to the I'm also pretty green when it comes to webpack, so I don't know a solid work around that still covers the bases of that previous PR #2360 besides converting the error object to a string prior to the promise rejection. Obviously |
Hello again, |
I have this same error just running build on my local environment. |
I just started getting this error today :( Are we close to a fix for this issue? |
After
I believe this traces back to matthewmueller/dom-iterator#10. |
A (Edit: We were able to fix the That said, would be helpful to fix the error reporting so that the Webpack error is not hidden. |
Hello, I am newbie to Gatsbyjs. I used gatsby-starter-lumen, on ubuntu 16.04 32bit with node v.8.8.1 and gatsby-cli version 1.1.11.
Well, it looks like there is an assumption that all the elements in stats.compiliation.errors are string or undefined, but because one of the element was an Error object, the assumption or any code which pushed the Error object is wrong. |
I fixed this error on my machine. It seems I renamed a file incorrectly. Thus my conclusion is that it can be filesystem related. |
Hi there! UPD |
Also having this issue. The build fails with |
@robertgonzales Did you try reverting the code that changed in #2360 back to what it was? When I did that my actual error was returned properly. See previous comment about that PR. |
Would love someone from this thread to investigate the issue and create a PR! |
Also helpful would be if someone has a public repo with this error you could share or if someone could build a site reproducing the problem. I don't know how to reproduce the problem you're seeing so can't solve it. |
@KyleAMathews Just created this fork https://github.com/3CordGuy/gatsby-starter-default
So I'm not sure if that is related to the bad error parsing from the Webpack errors array where the problem actually surfaces. |
Oh Cool. Minus the added |
Just ran the new version against the Netlify repo I created and it reports the error just fine now. 👍
|
@VitaliiZhukov You should be good with |
Latest release reports the error correctly. Looks like it was the Linux case-sensitive module name issue mentioned above. Thanks @KyleAMathews @jquense so much for the quick turnaround! |
Sounds like this issue can be closed. |
This builds just fine locally both in
gatsby develop
andgatsby build
.But once it pulls from my git repo (and runs on Netlify), it throws this.
Gatsby 1.1.10
Is there any way I can dig into the actual unhandled error?
The text was updated successfully, but these errors were encountered: