Skip to content
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

Show other wrapper require errors than MODULE_NOT_FOUND on console #366

Merged
merged 1 commit into from Jul 30, 2016

Conversation

kennu
Copy link
Contributor

@kennu kennu commented Jul 25, 2016

I spent a lot of time debugging an issue caused by a wrapper JSX that tried to use window when server-side rendering. It was hard to identify because Gatsby quietly ignored the wrapper require errors.

So I made this patch to show require errors when they are something else than "module not found". For some reason, when running Gatsby, e.code is not set to MODULE_NOT_FOUND as it should, so I also included a regex check for the message.

@KyleAMathews
Copy link
Contributor

Oh so sorry about this... we'd run across this same problem elsewhere but missed fixing this one :-( Thanks for the PR! I'm sure it'll save a lot of other people trouble.

The PR looks great other than an eslint error. If you could fix that, I'll get this merged and cut a new release.

@kennu
Copy link
Contributor Author

kennu commented Jul 26, 2016

Pushed new version with lines wrapped, eslint should accept it now.

@KyleAMathews
Copy link
Contributor

Hmmm Travis failed again but it was a Mac timing out. They've been super flakey lately :-( Oh well...

Merging, thanks! This is perfect. Thanks so much for helping make Gatsby better!

@KyleAMathews KyleAMathews merged commit 441ca2c into gatsbyjs:master Jul 30, 2016
@kennu
Copy link
Contributor Author

kennu commented Jul 30, 2016

Thanks for a great platform, it's become my default for building websites :-)

@KyleAMathews
Copy link
Contributor

Good to hear :-)

On Sat, Jul 30, 2016 at 9:06 AM Kenneth Falck notifications@github.com
wrote:

Thanks for a great platform, it's become my default for building websites
:-)


You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub
#366 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAEVh1euj3rqnHXeqRMt68IFn_CXhp5mks5qa3Z9gaJpZM4JUb8h
.

@jlengstorf
Copy link
Contributor

Hiya @kennu! 👋

This is definitely late, but on behalf of the entire Gatsby community, I wanted to say thank you for being here.

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. (We’ve got t-shirts and hats, plus some socks that are really razzing our berries right now.)
  2. If you’re not already part of it, we just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. You’ll receive an email shortly asking you to confirm. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If you have questions, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again! 💪💜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants