#Error with Variant Props

29 messages · Page 1 of 1 (latest)

forest goblet
#

Hi, I'm trying to use tailwind-variants on my Vue project, but when I use VariantProps gives me an error of typing... could anyone help me? Thanks

#

It's working but with this error type, I'm not able to build my project to production...

hoary scarab
#

Which typescript version are you using?

forest goblet
#

version ^5.1.6

hoary scarab
#

Please try using a lower one e.g 5.0.4

forest goblet
#

not working too

hoary scarab
#

Do you have this option in your tsconfig.json ?

"skipLibCheck": true,
#

It seems to be related to the nuxt compiler, I don't have enough experience with it but it seems to be compiling the tailwind-variants types

forest goblet
#

I think that is the problem with nuxt too, this skipLibCheck is from nuxt tsconfig

hoary scarab
#

So you don't have access to it?

forest goblet
#

i have

#

what i have to change?

#

put skipLib to false?

hoary scarab
#

Try excluding the node_modules

"exclude": ["**/node_modules"]
forest goblet
#

not working too, I will try with a Vue project! before this print I've tried with "exclude": ["**/node_modules"]

hoary scarab
#

But here you have the skip library check in false why? 🤔

forest goblet
#

I don't know too, but I was trying everything to fix this... without the skipLibCheck: false was not working too

hoary scarab
#

You have to use skipLibCheck: true

forest goblet
#

skipLibCheck: true are in the .nuxt/tsconfig.json

#

i put on my tsconfig.json but is not working

hoary scarab
#

Nuxt compiler should ignore libs ts compilation, so idk maybe is better to check with nuxt community

forest goblet
#

ok, i will try! thanks

keen badge
#

Hi, where you able to fix this? From what I'm reading this is an issue with Vue TSC that is not able to correctly get the types when using complex types, so in this case you have to use /* vue-ignore */