Skip to content

Fix formatWebpackMessages - fixes empty errors in console and overlay - #4934

Closed
DanProudfoot wants to merge 1 commit into
react:nextfrom
DanProudfoot:next-error-handling
Closed

DanProudfoot wants to merge 1 commit into
react:nextfrom
DanProudfoot:next-error-handling

Conversation

@DanProudfoot

Copy link
Copy Markdown

The old version of this function looked for any mention of thread-loaded and then deleted everything thereafter - which most of the time included the actual stack trace that you wanted.

My fix just gets rid of the 3 lines from the threadLoaderIndex and leaves the rest in.

I feel this is a very naive fix, as I don't know the full breadth of errors to check against to know if I'm lopping anything else off at the wrong moment.....but it seems to work in my very limited testing thus far

Before:
screen shot 2018-08-28 at 16 01 28

After:
screen shot 2018-08-28 at 15 59 31

Removes some specific lines, rather than everything after the threadLoaderIndex
@Pajn

Pajn commented Aug 28, 2018

Copy link
Copy Markdown
Contributor

👍 I have too experienced the issue but never gotten to the bottom of it.

@marcofugaro

Copy link
Copy Markdown
Contributor

I attempted to fix this more safely in #4656, but I think your solution is cleaner!

Please someone bring in one of these PR!

@DanProudfoot

Copy link
Copy Markdown
Author

Hah, I didn't even notice your fix, it does seem safer. I guess one thing to ascertain is: do all module-loader errors insert the same 3 lines that I can naively destroy, or are there permutations?

@Timer

Timer commented Sep 18, 2018 •

Copy link
Copy Markdown
Contributor

This is solved in the latest next HEAD.

@Timer Timer closed this Sep 18, 2018
@marcofugaro

Copy link
Copy Markdown
Contributor

Good job @Timer! For anyone wondering the commits are 74e4527 and 710557f.

Could you publish a new next version so we can help you testing it?

Also does this work correctly only assuming that this issue is fixed? webpack-contrib/eslint-loader#246. Or is that independent?

@DanProudfoot
DanProudfoot deleted the next-error-handling branch November 12, 2018 15:05
@lock lock Bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants