-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
create-react-app v3 doesn't show TypeScript errors in overlay #2090
Comments
Well, after trolling around with the TypeScript compiler today, I've found a hacky way to show the errors in the browser. I've got it running here: https://codesandbox.io/s/create-react-app-v3-with-typescript-overlay-errors-colix References for what I was trying to do (type checking TypeScript code in https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler microsoft/TypeScript#29226 (comment) https://gist.github.com/teppeis/6e0f2d823a94de4ae442 dsherret/ts-morph#358 (comment) https://stackoverflow.com/questions/52969177/typescript-createprogram-throwing-ts-sys-is-undefined (with the error "Cannot read property 'useCaseSensitiveFileNames' of undefined") Note that there are still significant problems with this approach:
|
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made. |
not stale |
This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed. |
not stale |
This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed. |
hello stalebot |
This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed. |
bot |
🐛 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):
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
PROD-1561199685-a102c8493
Ref (maybe related?): #1303
The text was updated successfully, but these errors were encountered: