[vue-tsc] errors happening when using > 0.32.1
See original GitHub issueExpected behavior
Running vue-tsc --noEmit
should run without any errors
Actual behavior
Running vue-tsc --noEmit
will output the following errors:
node_modules/@babel/parser/typings/babel-parser.d.ts:14:23 - error TS2307: Cannot find module '@babel/types' or its corresponding type declarations.
14 ): ParseResult<import("@babel/types").File>;
~~~~~~~~~~~~~~
node_modules/@babel/parser/typings/babel-parser.d.ts:22:23 - error TS2307: Cannot find module '@babel/types' or its corresponding type declarations.
22 ): ParseResult<import("@babel/types").Expression>;
~~~~~~~~~~~~~~
node_modules/@vue/compiler-core/dist/compiler-core.d.ts:1:57 - error TS2307: Cannot find module '@babel/types' or its corresponding type declarations.
1 import type { BlockStatement as BlockStatement_2 } from '@babel/types';
~~~~~~~~~~~~~~
node_modules/@vue/compiler-core/dist/compiler-core.d.ts:2:45 - error TS2307: Cannot find module '@babel/types' or its corresponding type declarations.
2 import type { Function as Function_2 } from '@babel/types';
~~~~~~~~~~~~~~
node_modules/@vue/compiler-core/dist/compiler-core.d.ts:4:33 - error TS2307: Cannot find module '@babel/types' or its corresponding type declarations.
4 import type { Identifier } from '@babel/types';
~~~~~~~~~~~~~~
node_modules/@vue/compiler-core/dist/compiler-core.d.ts:5:37 - error TS2307: Cannot find module '@babel/types' or its corresponding type declarations.
5 import type { Node as Node_3 } from '@babel/types';
~~~~~~~~~~~~~~
node_modules/@vue/compiler-core/dist/compiler-core.d.ts:6:37 - error TS2307: Cannot find module '@babel/types' or its corresponding type declarations.
6 import type { ObjectProperty } from '@babel/types';
~~~~~~~~~~~~~~
node_modules/@vue/compiler-core/dist/compiler-core.d.ts:8:30 - error TS2307: Cannot find module '@babel/types' or its corresponding type declarations.
8 import type { Program } from '@babel/types';
Info
vue-tsc
: 0.33.9typescript
: 4.6.3vite
: 2.8.6
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Volar and vue-tsc are showing different TS errors
I use VS Code with Volar. Now on one hand I have all my TS errors printed in the console which is what...
Read more >vue-tsc - npm
Install: `npm i vue-tsc -D`. Latest version: 1.0.13, last published: 20 hours ago. Start using vue-tsc in your project by running `npm i...
Read more >Vue 3 Setup: Vue TypeScript Service false errors not ...
Create a Vue 3.2.37 app, with vue-tsc 0.38.1 , vite 2.9.12 & @vitejs/plugin-vue 2.3.3. 2. Create a test component: <template> <h1>test</h1> </template>.
Read more >vue/test-utils: Versions - Openbase
Full version history for @vue/test-utils including change logs. ... fix: allow to use KeepAlive or keep-alive in stubs by @cexbrayat in ...
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 Free
Top 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
npm i -D @babel/types
is also a workaround. This keeps the type checking for other libs.@babel/types
is not a indirect depend of vue-tsc after 0.33.0, this is correct error because@vue/compiler-core
do not have@babel/types
independencies
, please report to upstream or just send a PR.https://github.com/vuejs/core/blob/245230e135152900189f13a4281302de45fdcfaa/packages/compiler-core/package.json#L41