Closed 9mm closed 3 months ago
Hello There!
I'm afraid I can't reproduce this issue on a new vue 3
+ vite
project.
This seems to be a problem related to parsing of the vue file and might be related to vue-tsc
itself, could you create a reproduction please?
Thanks !
I cant add a reproduction link so if you have to close this i understand.
im using vue-tsc 1.8.27 because nuxt 3 can't support vue-tsc 2 yet
I think you're referring to this issue if I'm not mistaken, which is fixed by now. could you update you're dependencies (using ncu
) and confirm the fix?
I don't have any issue with vue-tsc
2.x and nuxt
3.x.
If you're using
typescript: {
typeCheck: true
}
In your nuxt.config.ts
, nuxt crashes with this error.
Cannot restart nuxt: Cannot find module 'vue-tsc/out/index'
It seems that issue is not resolved yet.
@Saeid-Za hmm.. how do you have it specified in package.json?
This still results in the index error you linked to: "vue-tsc": "^2.0.24"
You are correct. With typeCheck
set to true, errors persist regardless of the vue-tsc
version, both in the UI or in the terminal.
This issue should be reported to the vue-tsc
repo as unfortunately, there is nothing we can do on our end to resolve it.
In the meantime, I suggest disabling typeCheck
and using the command npx nuxi typecheck
whenever type checking is needed.
So ive installed vue-tsc from master, and the 'index' bug is gone, and im fully on 2.0 with latest TS:
"tsc#master": "link:vuejs/language-tools/tree/master/packages/tsc#master",
"typescript": "5.4.5"
I can report upstream, but before I do that I just wanted to make sure that it's not some kind of syntax error. I've never seen a slot that just has a floating :some-thing
before. I also noticed it's not used on any other components.
I'm asking because if you look at the error, it looks like it's improperly parsing it, as if its invalid vue code. it thinks they're different properties separated by a hyphen:
Property 'heading' does not exist on type
> 23 | <slot :heading-value>
| ^^^^^^^
Property 'value' does not exist on type
> 23 | <slot :heading-value>
| ^^^^^
Notice it says "heading" and "value" separately
actually.... it might be loading vue-tsc from some other plugin. so ignore me for the time being
new nuxt is out and error finally went away
Reproduction
This is just after running
npx shadcn-vue@latest add range-calendar
with typescript. Its as simple as it gets, so hopefully no reproduction is neededDescribe the bug
After adding the range component, I immediately get the following typescript errors for
RangeCalendarHeading
:System Info
Contributes