-
Notifications
You must be signed in to change notification settings - Fork 330
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
fix: report error #183
fix: report error #183
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I've moved and modified your changes to the server/index.ts which I think is the better place for this. Let me know if this doesn't solve your issue.
Thank you!
I don't think that's gonna work, because when I debugged it, the server/index.ts wasn't run, that why I put it in the mock server file. I think I tried your approach at one point and didn't work, but I'm gonna have to double check tomorrow |
Perhaps we need it in both 🤔 Or maybe we should put it in the |
In my testing, on Windows 11, in case of an error in mock server or express server |
I can confirm this also happens in the latest macOS (Ventura 13.4). |
I've got work locally that puts it in the root index.js and that works for me. |
Sorry, I didn't get what you mean. Is having it wrap everything on the index.js enough? |
This: 9543c5f :) |
Test Plan
Hi! Many times I have experienced a situation where something happened during development and I couldn't see any error.
To give you an example.. I installed
lexical
and@lexical/react
, which is a wysiwyg builder from Facebook. I think they don't provide ESM bundle or whatever. My point is that if you use it anywhere in the code likeThe build starts hanging
There is no error to be viewed. I dug deeper and had to debug the code. Turns out, the
closeWithGrace
is called intests/mocks/index.ts
, it stops the mock server but does nothing else.Not sure if this PR is the right approach, but at least it will report any errors in the console and closes the whole dev server.
With this change, it looks like this