harlan-zw / nuxt-seo

The complete SEO solution for Nuxt.

Home Page:https://nuxtseo.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typescript Error: useBreadcrumbItems without @nuxt/ui

konradsienkowski opened this issue · comments

Describe the bug

Hi,
it seems that using useBreadcrumbItems composable without having @nuxt/ui installed results in a Typescript error.

In my app, I want to use composable just to generate the links list and style it on my own (without using @nuxt/ui).
I've got a file called /pages/events/[slug].vue, where I want to override the label of a last item in the Breadcrumbs:

const breadcrumbs = useBreadcrumbItems({
  overrides: [
    undefined,
    undefined,
    {
      label: title.value,
    },
  ],
}); 

That results in a Typescript error:

Object literal may only specify known properties, and 'label' does not exist in type 'BreadcrumbItemProps'.

Also, when I open node_modules/@nuxtjs/seo/dist/runtime/nuxt/composables/useBreadcrumbItems.d.ts where composable types are stored, there's another error popping up:

"Cannot find module '@nuxt/ui/dist/runtime/types' or its corresponding type declarations."

Reproduction

No response

System / Nuxt Info

No response

Thanks for the issue, should be fixed in RC 6 :)