Unknown custom element: <b-form-select-option>
See original GitHub issueI 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:
- Created 4 years ago
- Reactions:2
- Comments:7 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Upgrade to BootstrapVue
v2.2.2
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