You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a pnpm installation, nuxt typecheck fails with:
> nuxt typecheck
error TS2688: Cannot find type definition file for 'swiper/vue'.
The file is in the program because:
Entry point of type library 'swiper/vue' specified in compilerOptions
Found 1 error.
This is because nuxt-swiper pushes swiper/vue to types:
but the Nuxt project itself doesn't have swiper as a dependency, so type checking fails.
Instead, nuxt-swiper should re-export swiper/vue (being swiper-nuxt dependency) as something like swiper-nuxt/types, and use it for the injected reference.
The current workaround is to manually install pnpm add swiper@^10.3.1 but this needs to be manually synced with swiper (the latest version of swiper which installs by default is already one major version ahead), and is thus error-prone.
The text was updated successfully, but these errors were encountered:
In a pnpm installation,
nuxt typecheck
fails with:This is because
nuxt-swiper
pushesswiper/vue
to types:nuxt-swiper/src/module.ts
Lines 30 to 32 in ab323dc
but the Nuxt project itself doesn't have
swiper
as a dependency, so type checking fails.Instead,
nuxt-swiper
should re-exportswiper/vue
(beingswiper-nuxt
dependency) as something likeswiper-nuxt/types
, and use it for the injected reference.The current workaround is to manually install
pnpm add swiper@^10.3.1
but this needs to be manually synced with swiper (the latest version ofswiper
which installs by default is already one major version ahead), and is thus error-prone.The text was updated successfully, but these errors were encountered: