Skip to content

BNavItemDropdown broken on Nuxt? #1972

@jonkri

Description

@jonkri

Describe the bug

Create a new Nuxt 3 project. Pick the default options.

$ npx nuxi@latest init b-nav-item-dropdown-example
$ cd b-nav-item-dropdown-example

Install bootstrap, bootstrap-vue-next and @bootstrap-vue-next/nuxt:

$ npm install --save-dev bootstrap bootstrap-vue-next @bootstrap-vue-next/nuxt

Add modules: ['@bootstrap-vue-next/nuxt'], and css: ['bootstrap/dist/css/bootstrap.min.css'], to nuxt.config.ts.

Replace app.vue with:

<template>
  <BNavItemDropdown text="Test">
    <BDropdownItem>Test</BDropdownItem>
  </BNavItemDropdown>
</template>

Start the project:

$ npm run dev

Click on the dropdown. Note the error in the console (“TypeError: el is null”).

Including all composables and directives didn't make a difference.

I've tried some other components (like BButton) and they have worked fine.

There's also a hydration mismatch.

The same code worked on StackBlitz.

Reproduction

N/A

Used Package Manager

npm

Validations

  • Have tested with the latest version. This is still alpha version and sometime things change rapidly.
  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneed reproductionThis needs a reproduction in order to continuestaleThere has been no additional replies or questions and the thread is assumed closed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions