Gatsby develop crashes on type errors #36
Comments
Thank you for the kind words! It indeed shouldn't crash the main process & only report the error in terminal. Does it happen consistently for you? Sorry about the inconvenience. |
I'm afraid I can't reproduce it right now. It seems to work for the moment. I guess it has to do with the nature of the specific error, as it seems to crash if the error happens while SSR is happening. At least that's how I interpret above error. Sadly I don't have a lot of knowledge of how gatsby handles SSR exactly, so it's hard for me to debug or reproduce. The errors kept happening while I was converting the JS codebase to TS. Maybe it had something to do with the specific errors I got while converting and having a mixed codebase? I'll keep my eyes open to see if it happens again and if I can manage to find out the circumstances that lead to the crash You can close the issue for now if you want, I'm happy to come back to it later IF it happens again and we could reopen it then. |
I've just updated the default fork-checker plugin (#64) so it show error on the browser + might prevent crashes, please upgrade (2.4.0) and try it out! Will close this issue for now, please feel free to reopen if the crash happens continuously. |
I have this issue when using
|
I found out this is caused by the call to Also see this: gatsbyjs/gatsby#13179 |
@olee thanks so much for identifying the cause! Comes to think about it, codegen should never crash its process. If you have time to spare, would you like to send a PR to change |
I am just converting a rather small gatsby project to typescript using this awesome plugin. It seems to be a lot better than the default typescript plugin.
But I have come across one quite annoying behavior: When running gatsby develop it seems to crash after some type errors occured. Here is an example:
This can be quite annoying as type errors are expected during development and the dev server should simply display those errors on a console (ideally in browser and terminal) without crashing.
Is this a known behavior or is it something I'm doing wrong on my end?
The text was updated successfully, but these errors were encountered: