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

JSX SyntaxError breaks this plugin #28

Closed
mnlj opened this issue Jan 9, 2019 · 6 comments
Closed

JSX SyntaxError breaks this plugin #28

mnlj opened this issue Jan 9, 2019 · 6 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@mnlj
Copy link

mnlj commented Jan 9, 2019

I've set it up in my test project according to the Usage section and when I try a reference error as in the example, it works correctly. However, if I for example remove random closing tag in JSX, things break:
overlay1
overlay2

If you look at the second image, the weird part is
GET https://localhost:3000/babel/parser/lib/index.js 404 (Not Found) which is requested from "node_modules/react-error-overlay". this breaks things. If I create similar SyntaxError in a create-react-app test app, this doesn't happen and a proper Failed to compile error appears in the overlay. Any ideas?

@gregberge gregberge added help wanted Extra attention is needed bug Something isn't working labels Jan 11, 2019
@gregberge
Copy link
Owner

Hello I am sorry I don't have time to investigate the bug. I added the badge, if someone have time to investigate it, it is welcome!

@chrispcode
Copy link

Are you sure you have added the missing p tag. Just asking?

@mnlj
Copy link
Author

mnlj commented Jan 22, 2019

@chrispcode this is not about my code, it's about error showing properly in overlay. Missing p tag was a simulated syntax error, if such error happens in create-react-app, it shows it in the error overlay just fine, if it happens using this plugin, it breaks because react-error-overlay dependency loads wrong babel js and the visual output is stuck on the ansi coded garbage error.

@chang-ke
Copy link
Contributor

chang-ke commented Mar 10, 2019

@mnlj @neoziro this problem may because of terminal color character
use /(\u001b\[\d*m)/g can replace color character
image

@gregberge
Copy link
Owner

Thanks for the update @Tungpin, feel free to submit a PR to fix this problem.

@gregberge
Copy link
Owner

Looks like it is fixed, feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants