ui icon indicating copy to clipboard operation
ui copied to clipboard

"embla-carousel-react" has no exported member named 'EmblaCarouselType'. Did you mean 'UseEmblaCarouselType'?ts(2724)

Open developeratul opened this issue 1 year ago • 2 comments
trafficstars

In the new carousel component,

import useEmblaCarousel, {
  type EmblaCarouselType as CarouselApi,
  type EmblaOptionsType as CarouselOptions,
  type EmblaPluginType as CarouselPlugin,
} from "embla-carousel-react"

These types were not exported from the embla-carousel-react package.

In that case, we need to install the embla-carousel package and import them from there. Like this:

import {
  type EmblaCarouselType as CarouselApi,
  type EmblaOptionsType as CarouselOptions,
  type EmblaPluginType as CarouselPlugin,
} from "embla-carousel";
import useEmblaCarousel from "embla-carousel-react";

Should I proceed with giving a PR regarding that? Pardon my mistakes.

developeratul avatar Jan 12 '24 14:01 developeratul

i am also getting this error, i think this should be merged soon btw thanks for the solution 👍

ridhosatriawan avatar Jan 12 '24 16:01 ridhosatriawan

there is already a PR for this here: #2326

0xtito avatar Jan 12 '24 17:01 0xtito

@developeratul Closing this as duplicate of https://github.com/shadcn-ui/ui/issues/2281. Let's track there. Thanks.

shadcn avatar Jan 14 '24 08:01 shadcn