-
Notifications
You must be signed in to change notification settings - Fork 86
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
Avoid crashing dev server on file rename #119
Comments
Yuppp! wanting to do that. You want to make a PR for this? |
Not right now, if someone wants to make a PR, feel free to do so 👍 |
Please can someone fix that, this is really really annoying |
give a reproducible repo please so i can test this and possibly fix it. i dont see this happen |
It is quite simple, just import a module that doesn't exist, the server instantly crashes |
ill try to find a good way around it and create a PR |
So what would be the expected behavior? I just tested it real quick and I just get a normal error overlay and once I remove the line, which is breaking, it refreshs and good to go again. |
(At least with Solid Start) it really depends on what the error is, some of them just show the error overlay and go away when fixed, others still crash the server. Here's some ways to crash it with a fresh Solid Start
import { Title } from "@solidjs/meta";
-import Counter from "~/components/Counter";
+import Counter from "~/components/Counte"; I think this always crashes it when there's a valid import and it becomes invalid while the dev server is running.
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/favicon.ico" />
- {assets}
+ {foo}
</head> No idea why this one crashed it, but just putting some gibberish in the global scope does not. I guess it's due to some SSR thing not handling errors inside the tree. |
So after investigating a bit, I dont really see how we can prevent this issue on our side, I assume it could be fixed on Edit: Hm, cannot reproduce in their playground, ill doublecheck again. |
There's currently lot's of ways to crash the dev server, could we add a global error handler so this doesn't happen?
When renaming a file, the error message looks something like:
The text was updated successfully, but these errors were encountered: