Error in bootstrap-vue/src/index.scss
See original GitHub issueDescribe the bug
Cannot use bootstrap-vue in my vue project.
Steps to reproduce the bug
- Serve the app.
error in ./node_modules/bootstrap-vue/src/index.scss
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Undefined variable.
╷
11 │ $b-custom-control-indicator-size-lg: $custom-control-indicator-size * 1.25 !default;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
node_modules/bootstrap-vue/src/_variables.scss 11:38 @import
Expected behavior
Compile scss without errors.
Versions
Libraries:
- BootstrapVue: 2.17.1
- Bootstrap: 4.5.2
- Vue: 2.6.12
Additional context
My main.js file:
import Vue from 'vue'
...
import '@/assets/css/plugins/bootstrap/config.scss'
import 'bootstrap/scss/bootstrap.scss'
import 'bootstrap-vue/src/index.scss'
...
Issue Analytics
- State:
- Created 3 years ago
- Comments:20 (2 by maintainers)
Top Results From Across the Web
Vue bootstrap-vue throwing error after installation
In your App.vue, you need to import _custom.scss before bootstrap style sheet as it contains the referenced variables.
Read more >Theming Bootstrap | Reference - BootstrapVue
Theming is accomplished by SASS variables, SASS maps, and custom CSS. There's no dedicated theme stylesheet; ... node_modules/bootstrap-vue/src/index.scss'; ...
Read more >Getting Started - BootstrapVue
Bootstrap v4 CSS employs a handful of important global styles and settings that you'll need to be ... @import 'node_modules/bootstrap-vue/src/index.scss';.
Read more >Form Validation | Reference - BootstrapVue
js that allows you to validate input fields and display errors. It has full support for Vue I18n and provides fairly good out...
Read more >Modal | Components - BootstrapVue
Modals are streamlined, but flexible dialog prompts powered by JavaScript and CSS. They support a number of use cases from user notification to...
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
I landed here on the exact same error, after some mussing around I found out that I had installed bootstrap v5 instead of the (current, supported) v4. Just, you know, check for that as well.
I figure multiple people will land on this because doing
npm install bootstrap
will now installBootstrap 5
by default given that it released out of beta a few days ago. So to solve this runnpm install bootstrap@4.5.3
instead, to specifically install the latest version of Bootstrap that BootstrapVue supports.