-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typecheck not working with pnpm #126
Comments
Just faced this issue, after switching to pnpm (used npm) |
Same issue here, problem started with a new pnpm version probably as we did not have it before. |
yeah, looks like it won't be fixed, so i chose npm over pnpm (slower, but more maintanable) |
Same issue with Nuxt3 and pnpm, any workarounds that can hide the type error? Edit: Nevermind I just added swiper as a package also |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: