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

Type errors with 3.10.0 in Vue template section (Nuxt project) #361

Closed
Anton-Plagemann opened this issue Aug 8, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@Anton-Plagemann
Copy link

Environment

Project info:



Reproduction

Let me know if you need a reproduction repo.

Describe the bug

Starting from unimport 3.10.0 I get type errors like these all over my nuxt app (see log section for a full example output):
image

I tracked it down to the following code change (Line 84 to 91):
v3.9.1...v3.10.0#diff-ff328eec8d9ee3a30a4b685a1fe08482bc3edf274cba60669ce7869375d6d5e9

Reversing it make the errors disappear (using 3.9.1 does so too). Maybe it was removed by accident?
The issue emerged, when I updated @nuxt/eslint from 0.4.0 to 0.5.0 which also updated unimport from 3.9.1 to 3.10.0.

Additional context

No response

Logs

Property 'useRoute' does not exist on type 'CreateComponentPublicInstance<Readonly<ExtractPropTypes<{}>>, { providerLogos: typeof providerLogos; t: typeof t; providerNames: typeof providerNames; auth: typeof auth; user: typeof user; redirectUrl: typeof redirectUrl; }, ... 17 more ..., {}>'.ts-plugin(2339)
@Anton-Plagemann Anton-Plagemann added the bug Something isn't working label Aug 8, 2024
@byronogis
Copy link

Check if you can reproduce the issue with other dependencies. I encountered the same problem when using the new version of peimvue, and I found a related issue at that time.

primefaces/primevue#6199

@Anton-Plagemann
Copy link
Author

Seems like this is caused by a change, how libraries augment the vue-type. See here for the reason and a temporary fix that worked for me.
Closing this issue, as it seems there's nothing wrong with unimport 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants