-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
vite: Missing stacktrace on SSR import errors #9041
Comments
I'm getting something similar at the same line of code in entry.server.ts. What is strange is that this works great while just running the following from the terminal, but can't debug through launch.json from within vscode. Not sure what the difference is.
The error I see in the browser when i load http:https://localhost:5173/ is:
Here is my stacktrace:
Here is my envinfo output:
|
I do have a debug work around which is a pain in the @$$, but it works. I can run npm run dev from the commmand line and then just attach the debugger manually. |
Just stumbled upon this issue in my app.. Try import { isbot } from 'isbot'; instead of import isbot from 'isbot'; It resolved the problem for me |
Reproduction
Had invalid default import for
isbot
, which was failing inentry.server.ts
:System Info
Used Package Manager
npm
Expected Behavior
Include some degree of a stacktrace to ensure the behavior is debuggable. It appears hidden within the Vite renderer, and its unclear if anything can be done about that.
Vite's SSR suggest you enrich the error with
vite.ssrFixStacktrace
, but I'm not familiar enough with their internals to know if that missing link is the issue here.Actual Behavior
The error is swallowed inside of
handleRequest
(in@remix-run/express
), so unable to diagnose further without reimplementing that (which I'm working on right now).The text was updated successfully, but these errors were encountered: