Skip to content
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

Cannot find module '@vitest/utils/diff' or its corresponding type declarations. #3162

Closed
6 tasks done
ocavue opened this issue Apr 10, 2023 · 1 comment · Fixed by #3172
Closed
6 tasks done

Cannot find module '@vitest/utils/diff' or its corresponding type declarations. #3162

ocavue opened this issue Apr 10, 2023 · 1 comment · Fixed by #3172
Assignees

Comments

@ocavue
Copy link
Contributor

ocavue commented Apr 10, 2023

Describe the bug

After updating vitest to 0.30.0, running tsc --noEmit will raise the following errors:

node_modules/@vitest/runner/dist/utils.d.ts:5:29 - error TS2307: Cannot find module '@vitest/utils/diff' or its corresponding type declarations.

5 import { DiffOptions } from '@vitest/utils/diff';
                              ~~~~~~~~~~~~~~~~~~~~

node_modules/vitest/dist/index.d.ts:6:37 - error TS2307: Cannot find module '@vitest/snapshot/environment' or its corresponding type declarations.

6 export { SnapshotEnvironment } from '@vitest/snapshot/environment';
                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reproduction

https://codesandbox.io/p/sandbox/practical-darwin-sq0t0x?file=%2Fpackage.json

Run yarn test in this repo and you will see the error.

image

System Info

N/A (Codesandbox environment)

Used Package Manager

yarn

Validations

@xieyuheng
Copy link

I meet similar errors when update from 0.29 to 0.30.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants