#Resolving TS2307 Error for Dynamic Component Imports in Nuxt 3
1 messages · Page 1 of 1 (latest)
Could you solve it?
I have a similar problem but only in stories and tests in version 3.11.0
nope, just added ts-ignores for now but I don’t know how to fix that
what's the error when you mouse over?
Depending on how and where you created the component files, you might’ve to restart the server to help vscode find them
its webstorm and this error is there for like 2 months now (readded node modules and .nuxt like 100 times since), thats not the problem.
Oh okay
“Any idea how I could potentially fix my TS2307: Cannot find module […]”
but thanks for trying to help anyway
can't really say without a reproduction
not sure why your components are throwing that or what you're doing elsewhere
Pretty sure that it is because of my usage of dynamic components ->
<component :is="currentStep" @next="nextStep" @prev="prevStep" class="bg-neutral-900" />
So have u resolved it?
Nope still having trouble with this
This right here would be a workaround but its not that smooth and doesnt fit for other areas with a lot more components :/
Hi, I am not sure if this would work for you, but in my case I had to do this
const tenantForm = defineAsyncComponent(() => import('~/components/dialog/Tenant.vue'))
and when I had to use my component as a prop I used it with: markRaw(tenantForm)