question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unknown custom element: <b-form-select-option>

See original GitHub issue

I am using Nuxt CLI. I want to create a select component. my selection tag must have a placeholder. I used the sample in the documentation for this but received the following warning :

[Vue warn]: Unknown custom element: <b-form-select-option> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

use a sample

<template>
  <div>
    <b-form-select v-model="selected" :options="options" class="mb-3">
      <!-- This slot appears above the options from 'options' prop -->
      <template v-slot:first>
        <b-form-select-option :value="null" disabled>-- Please select an option --</b-form-select-option>
      </template>

      <!-- These options will appear after the ones from 'options' prop -->
      <b-form-select-option value="C">Option C</b-form-select-option>
      <b-form-select-option value="D">Option D</b-form-select-option>
    </b-form-select>

    <div class="mt-3">Selected: <strong>{{ selected }}</strong></div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        selected: null,
        options: [
          { value: 'A', text: 'Option A (from options prop)' },
          { value: 'B', text: 'Option B (from options prop)' }
        ]
      }
    }
  }
</script>

package.json

"bootstrap": "^4.4.1",
"bootstrap-vue": "^2.0.0",
"nuxt": "^2.11.0",

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
tmorehousecommented, Jan 19, 2020

Upgrade to BootstrapVue v2.2.2

1reaction
tmorehousecommented, Jan 13, 2020

Someone else had a similar issue and it was because they were using v2.1.0 (not v2.2.0):

https://stackoverflow.com/questions/59678515/b-form-select-option-not-working-in-bootstrap-vue

Read more comments on GitHub >

github_iconTop Results From Across the Web

bootstrap-vue.js with laravel Unknown custom element
1 Answer 1 · I added components: { 'b-alert': BAlert } to the file, now i get an error BAlert is not defined....
Read more >
How to Solve "Unknown Custom Element" in Vue
For recursive components, make sure to provide the "name" option. Don't worry, I'll show you exactly how to fix this. You need to...
Read more >
Problems use boostrap-vue and other components with vue ...
When i try to use components like bootstrap-vue in my children components i recieve this error: [Vue warn]: Unknown custom element: <b-modal> - ......
Read more >
Form Select | Components
Custom component using cross-browser custom styles. Optionally generate entries based on an array, array of objects.
Read more >
[Vue warn]: Unknown custom element: - did you register the c
Does not make sense that this doesn't work ...   <pre class=code-toolbar grey lighten-2 p-3 mb-3><template> <section> <mdb-input ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found