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.

Error in bootstrap-vue/src/index.scss

See original GitHub issue

Describe the bug

Cannot use bootstrap-vue in my vue project.

Steps to reproduce the bug

  1. 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:closed
  • Created 3 years ago
  • Comments:20 (2 by maintainers)

github_iconTop GitHub Comments

123reactions
AbrahamBrookescommented, Feb 16, 2021

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.

45reactions
Hiwscommented, May 10, 2021

I figure multiple people will land on this because doing npm install bootstrap will now install Bootstrap 5 by default given that it released out of beta a few days ago. So to solve this run npm install bootstrap@4.5.3 instead, to specifically install the latest version of Bootstrap that BootstrapVue supports.

Read more comments on GitHub >

github_iconTop 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 >

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