ui: Type error: '"embla-carousel-react"' has no exported member named 'EmblaCarouselType'. Did you mean 'UseEmblaCarouselType'?
Error while Building NextJS Project
Type error: '"embla-carousel-react"' has no exported member named 'EmblaCarouselType'. Did you mean 'UseEmblaCarouselType'?
1 | import * as React from "react"
2 | import useEmblaCarousel, {
> 3 | type EmblaCarouselType as CarouselApi,
| ^
4 | type EmblaOptionsType as CarouselOptions,
5 | type EmblaPluginType as CarouselPlugin,
6 | } from "embla-carousel-react"
Linting and checking validity of types .```
About this issue
- Original URL
- State: closed
- Created 6 months ago
- Reactions: 1
- Comments: 15 (1 by maintainers)
Commits related to this issue
- fix(carousel): adjust types for embla-carousel-react@8 (#2326) Fixes #2322 , #2281 Thanks to @akynau & @nianiam — committed to shadcn-ui/ui by Gomah 5 months ago
Hey! I ran into this issue as well. This seemed to fix it for me, although I’m not sure if there are any negative implications from this. @shadcn can you confirm this is alright to do?
This worked for me, thank you!
Not worked for me
The solution is:
Credits: https://github.com/shadcn-ui/ui/issues/2281#issuecomment-1881103338
This worked fine with me. I think this is better than above solutions where you have to import whole “embla-carousel” package separately.
Worked for me too …
Am I stupid?