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

Misleading error message as result of comments #672

Closed
0x80 opened this issue Jan 11, 2015 · 2 comments
Closed

Misleading error message as result of comments #672

0x80 opened this issue Jan 11, 2015 · 2 comments

Comments

@0x80
Copy link
Contributor

0x80 commented Jan 11, 2015

This one has bitten me several times. If you're not very used to jsx yet, and by accident put a // comment somewhere in the router jsx structure, you will get an error like this

Invariant Violation: Unrecognized route configuration element "<UnknownComponent>"

Someone like me might read that there is a mistake in one of the active routes, and starts looking in all the wrong places. Maybe even commenting out other blocks which only adds to the problem.

It would be great if the error could print something more informative. I've just wasted a few hours tracking this down and really felt like I was going insane. When scanning over the source code my brain is really trained to ignore comments.

@0x80 0x80 closed this as completed Jan 11, 2015
@0x80 0x80 changed the title Misleading error message as result of <Route></Route> Misleading error message as result of comments Jan 11, 2015
@0x80 0x80 reopened this Jan 11, 2015
@zhiyelee
Copy link

+1 and thx @0x80

@mpal9000
Copy link

Hi, can you please publish this change df38294. My problem is not about comments but in element.type checking, which is fixed by this change.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants