nuxt / nuxt

The Intuitive Vue Framework.
https://nuxt.com
MIT License
54.26k stars 4.96k forks source link

error with vue-tsc 2.0.29 #28440

Closed angrymusic closed 1 month ago

angrymusic commented 1 month ago

Environment


Reproduction

it looks like auto import is not working

Describe the bug

if i upgrade vue-tsc version,

i can't npm run build or dev

because I encounter errors with composable... etc.

`components/recruit/Table.vue:29:11 - error TS2339: Property 'convertUnixtoYMD' does not exist on type 'CreateComponentPublicInstance<Readonly<ExtractPropTypes<__VLS_TypePropsToOption<{ searchStr: string; data: RecruitList[]; }>>>, {}, unknown, ... 16 more ..., {}>'.

29 convertUnixtoYMD(item.endTime)

`
`components/solution/Intro.vue:40:21 - error TS2339: Property 'navigateTo' does not exist on type 'CreateComponentPublicInstance<Readonly<ExtractPropTypes<__VLS_TypePropsToOption<{ data: Res_Solution; }>>>, { t: ComposerTranslation<{ [x: string]: LocaleMessage<VueMessageType>; }, ... 4 more ..., string>; }, ... 17 more ..., {}>'.

40             @click="navigateTo({ path: '/customer/brochure' })"

`

it looks like auto import is not working

Additional context

No response

Logs

No response

remiconnesson commented 1 month ago

I have the same issues where two files failed to be detected as auto imports during type checks, the 10 other files work though

github-actions[bot] commented 1 month ago

Would you be able to provide a reproduction? πŸ™

More info ### Why do I need to provide a reproduction? Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making. ### What will happen? If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritize it based on its severity and how many people we think it might affect. If `needs reproduction` labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it. ### How can I create a reproduction? We have a couple of templates for starting with a minimal reproduction: πŸ‘‰ https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz πŸ‘‰ https://codesandbox.io/s/github/nuxt/starter/v3-codesandbox A public GitHub repository is also perfect. πŸ‘Œ Please ensure that the reproduction is as **minimal** as possible. See more details [in our guide](https://nuxt.com/docs/community/reporting-bugs/#create-a-minimal-reproduction). You might also find these other articles interesting and/or helpful: - [The Importance of Reproductions](https://antfu.me/posts/why-reproductions-are-required) - [How to Generate a Minimal, Complete, and Verifiable Example](https://stackoverflow.com/help/minimal-reproducible-example)
Ambrise commented 1 month ago

I'm a the same problem. When I create a util class in the folder utils, it gives me the error. I didn't have the error a few weeks ago

Ambrise commented 1 month ago

Sorry I didn't see that a correction was in progress. Thanks