Open
Description
🐛 bug report
Description of the problem
TypeScript errors in a create-react-app
sandbox are not displayed in the browser in the error overlay:
As a counter-example, the CRA errors in the overlay displayed locally:
I didn't find the original PR introducing this in CRA, but I found this PR discussing the feature: facebook/create-react-app#7091
Edit: Maybe this is the original PR? facebook/create-react-app#5903
This code from the PR looks like it could plausibly be the async handling of TypeScript errors (with modifying the webpack compilation stats and sending the errors and warnings to the webpack socket):
const messages = await tsMessagesPromise;
clearTimeout(delayedMsg);
statsData.errors.push(...messages.errors);
statsData.warnings.push(...messages.warnings);
// Push errors and warnings into compilation result
// to show them after page refresh triggered by user.
stats.compilation.errors.push(...messages.errors);
stats.compilation.warnings.push(...messages.warnings);
if (messages.errors.length > 0) {
devSocket.errors(messages.errors);
} else if (messages.warnings.length > 0) {
devSocket.warnings(messages.warnings);
}
How has this issue affected you? What are you trying to accomplish?
If possible, I would like to see TypeScript error messages in the error overlay in the browser (like in normal CRA locally).
Link to sandbox: link
Your Environment
Software | Name/Version |
---|---|
Сodesandbox | PROD-1561199685-a102c8493 |
Browser | Chrome 75.0.3770.100 |
Operating System | macOS 10.14.5 |
Ref (maybe related?): #1303