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

Upgrading vue-tsc from 2.0.29 to 2.1.x results in hundreds of TypeScript errors #128

Open
basil opened this issue Aug 29, 2024 · 7 comments

Comments

@basil
Copy link

basil commented Aug 29, 2024

Upgrading vue-tsc and @vue/language-core from 2.0.29 to 2.1.0 (and nothing else) results in 283 new TypeScript errors for me. To reproduce, check out neanes/neanes#933 and run npm install && npm run build. The default branch builds correctly. This issue was originally reported at vuejs/language-tools#4748, where @davidmatter wrote that

https://github.com/facing-dev/vue-facing-decorator seems to be the problem here

@ruojianll
Copy link
Contributor

I cloned [email protected]:basil/neanes.git, run

  1. git checkout vue-tsc-2.1.0
  2. npm install
  3. npm run dev
    No error found in electron app.

@juanparati
Copy link

juanparati commented Aug 30, 2024

@ruojianll: I cannot reproduce this issue with vue-tsc 2.1.0, however I face this issue with 2.1.2.

It seems that vue-tsc 2.1.2 cannot infer the components types.

Please see: vuejs/language-tools#4747

@basil : Are you sure that you didn't installed vue-tsc 2.1.2?, can you check you package-lock.json?

@ruojianll
Copy link
Contributor

It's possible, vite-plugin-vue also removed decorator support in .vue file.

vitejs/vite-plugin-vue#430

Use some temporary resolutions such as ts any at the moment.

@basil
Copy link
Author

basil commented Aug 30, 2024

I cloned [email protected]:basil/neanes.git, run

1. `git checkout vue-tsc-2.1.0`

2. `npm install`

3. `npm run dev`
   No error found in electron app.

The CI build failed: https://github.com/neanes/neanes/pull/933/checks

I wonder if npm ci would make a difference. I am using npm 10.7.0.

@basil
Copy link
Author

basil commented Aug 30, 2024

@basil : Are you sure that you didn't installed vue-tsc 2.1.2?, can you check you package-lock.json?

Checking the package-lock.json file from https://github.com/neanes/neanes/pull/933/files, I am using 2.1.0.

@basil
Copy link
Author

basil commented Sep 1, 2024

Hi @ruojianll, I saw that the related PR vuejs/language-tools#4763 was released in 2.1.4. As you can see from the CI build for neanes/neanes#936, this does not resolve the issue and I still get 283 new TypeScript errors with vue-tsc 2.1.4.

@MeesterDev
Copy link

MeesterDev commented Sep 4, 2024

I cannot reproduce this with vue-tsc 2.1.0, but can with 2.1.2.

Node v20.17.0
npm 10.8.1

Errors look like
error TS2339: Property 'TopBar' does not exist on type 'Required<{} & __VLS_WithComponent<"TopBar", { Transition: FunctionalComponent<TransitionProps, {}, any, {}>; TransitionGroup: new () => { $props: TransitionGroupProps; }; KeepAlive: { ...; }; Suspense: { ...; }; Teleport: { ...; }; } & this, "TopBar", "TopBar", "TopBar"> & __VLS_WithComponent<...> & __VLS_WithCompon...'.

(I'm mentioning this in the hope of Google picking it up, as Googling the error didn't work for me)

@basil basil changed the title Upgrading vue-tsc from 2.0.29 to 2.1.0 results in hundreds of TypeScript errors Upgrading vue-tsc from 2.0.29 to 2.1.x results in hundreds of TypeScript errors Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants