-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
show import errors in dev #1358
Conversation
Neat 💯 How about we wrap As for production, we can catch exceptions thrown by We can also catch exceptions thrown by |
viteDevServer.ssrLoadModule I've found no other way to catch these errors. |
In principle, the error must/should be catched somewhere by Vike, otherwise
Vike wouldn’t be able to show the error page.
In other words: if the error leads to the error page to be rendered then we
have, de facto, the opportunity to catch the error in Vike Land. (Although
make sure the error page exists, otherwise Vike has no error page to
render.)
…On Fri 15. Dec 2023 at 16:19, nitedani ***@***.***> wrote:
viteDevServer.ssrLoadModule
<https:/vikejs/vike/blob/9a3ac5afc806701af3aee467674c74cd5e0acb89/vike/node/runtime/page-files/setup.ts#L13>
doesn't throw any errors
I've found no other way to catch these errors.
—
Reply to this email directly, view it on GitHub
<#1358 (comment)>, or
unsubscribe
<https:/notifications/unsubscribe-auth/AAHVQRRO4CFCNDRO2MT4STLYJRTABAVCNFSM6AAAAABAV2CLTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJYGA2DOMZSGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
onRuntimeError is not called, it stops here: https:/vikejs/vike/pull/1358/files#diff-7fb721f8b206cd2db4fc64bbf0c4e005aac41836d50d66133acc17b019255d1cR114 |
I actually realized I forgot to try my changes 😅
Let me have a look. |
I just had a quick look. Vike treats the error as transpilation error and thus doesn't trigger |
42ceebd
to
6a6041b
Compare
26daede
to
2043733
Compare
Related: #621
Show helper message in dev.