error TS2307: Cannot find module '@vue/reactivity' or its corresponding type declarations.
See original GitHub issueReporting a bug?
When compiling, I am seeing these errors:
Starting compilation in watch mode....yarn/$$virtual/vue-i18n-virtual-8387eb67eb/0/cache/vue-i18n-npm-9.1.6-66ae7003f6-6da7c84c88.zip/node_modules/vue-i18n/dist/vue-i18n.d.ts:3:34 -
error TS2307: Cannot find module '@vue/reactivity' or its corresponding type declarations.
3 import type { ComputedRef } from '@vue/reactivity';
~~~~~~~~~~~~~~~~~
.yarn/$$virtual/vue-i18n-virtual-8387eb67eb/0/cache/vue-i18n-npm-9.1.6-66ae7003f6-6da7c84c88.zip/node_modules/vue-i18n/dist/vue-i18n.d.ts:32:42 -
error TS2307: Cannot find module '@vue/reactivity' or its corresponding type declarations.
32 import type { WritableComputedRef } from '@vue/reactivity';
Module versions (please complete the following information):
vue
: 3.1.2vue-i18n
: 9.1.6 (@next)
Reproduction Link
You can see the minimum changeset required to cause this (it’s basically just installing it)
https://github.com/bbugh/vue-tsx-tailwind-starter/compare/i18n-failure?expand=1
To Reproduce
git clone --depth 1 --branch i18n-failure https://github.com/bbugh/vue-tsx-tailwind-starter
yarn build
- Observe the type errors.
Expected behavior
It should compile without an error.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
ts2307: cannot find module '*.vue' or its corresponding type ...
I have got a Vue3 project running through Vite and trying to import my Vue3 component files in my App.vue . But instead...
Read more >4 - Stack Overflow
typescript - TS2307: Cannot find module './App. vue' or its corresponding type declarations - Stack Overflow. Stack Overflow for Teams – Start collaborating ......
Read more >TypeScript configuration and TS2307: Cannot find module error
I'm trying to set up a TypeScript project with the vue-class-component decorator support. Everything seems to be fine, the application ...
Read more >@vue/reactivity - npm
Start using @vue/reactivity in your project by running `npm i ... indicating that this package has built-in type declarations.
Read more >ts2307 cannot find module / import "fail" in vue files : WEB-37740
{{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, that’s a valid interpretation but it also needs to declare
@vue/reactivity
That’s an implementation detail and can change so it’s not enough to just peer depend on
vue
and assume you have access to@vue/reactivity
. It’s relying on hoisting to make it available which isn’t guaranteed to be in your favour - https://yarnpkg.com/advanced/rulebook#packages-should-only-ever-require-what-they-formally-list-in-their-dependencies