-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
During type checking, the type files in vitest and vite cannot find the type they use #4921
Comments
The issue might be related to
Probably your tsconfig is somewhat old-ish compared to what Vite/Vitest expect and having Lines 1 to 6 in 9ec3f74
Or disabling type check inside dependencies would probably workaround this and somewhat common thing to do as well: Line 37 in ca76f45
For some reason, I cannot run your repo locally (somehow Vitest is stuck) so I couldn't verify though. It might be nice if you can minimize repro further. |
Upgrading TypeScript and running
Running Does it mean Should these details be added to Vitests documentation, perhaps? |
@hi-ogawa I'd like to express my deep appreciation for the solution you provided. It was very detailed and helped me successfully resolve this problem. As for the issue you mentioned about not being able to reproduce the problem on your end, it might be because I updated the code afterwards. If you wish to reproduce it, I have created a separate branch with the original code at repord/vitest-type-issue . However, I have encountered a new issue, which you also noticed in my latest code. It seems that Vitest is getting stuck during execution. I will create a separate reproduction to confirm this issue and will open another issue for discussion once it's consistently reproducible. Also, I believe the suggestion made by @mrazauskas is valuable. I think the results of the testing phase should be as close as possible to the state during development. It's always puzzling when unexpected issues arise during testing that weren't anticipated during development. I'll close this issue and open it again if there are further discussions. |
Describe the bug
My type checking use case passed without a hitch, but there was a problem with the type inside the library itself
Reproduction
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: