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
vitest 0.34.3 - incorrect/missing stack traces with workspaces #4070
Comments
Start a new pull request in StackBlitz Codeflow. |
As I answered in PR, the function should only be defined for browser for now because they are patched before that when running in node, and should already be resolved. |
@sheremet-va intersting -- in my reproduction case above that isn't the case, there is some source mapping that isn't occurring that should be (and is if it's not limited to run for the browser only). It might be something to do with remix's |
Yes, in your case there is something that prevents it, so it's bug that needs investigating. If you want, you can look into this and why it doesn't return correct source map in your case:
|
@sheremet-va Righto so debugging that a bit further:
I'll keep digging… |
Tracked it down, Remix uses source-map-support as well and importing
I don't know enough about what that might do but I'd argue that is why things are getting mangled. |
Ok so I don't even know if this is really "fixable". There is Vitest does this on process launch which means further invocations of it wipe out what Vitest is trying to do. |
Yeah, remix shouldn't call it for Vitest. |
@sheremet-va Yea I'll open a ticket on Remix side, this is more their issue as there is no way to "disable" it and it should allow an override to the auto installing of it. |
Describe the bug
I've got a mono repo setup, with some aliases and other configs and vitest is failing to provide stack traces (or if it does provide them they are not being translated back to the source maps).
I've attached a simple reproduction (I'm using Remix) via StackBlitz.
In my investigations I came across
packages/vitest/src/node/error.ts:43
:If I changed this to be
project.getSourceMapModuleById(file)
it seemed to work?Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-b8e5f1?file=package.json
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: