Vue引入scss文件报错 Syntax Error: SassError: Undefined variable.23 │ $b-custom-radio-indicator-border-rad

错误如下:scss编译错误

 error  in ./src/assets/scss/index.scss

Syntax Error: SassError: Undefined variable.
   ╷
23 │ $b-custom-radio-indicator-border-radius-lg: $custom-radio-indicator-border-radius !default;
   │                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
  node_modules\bootstrap-vue\src\_variables.scss 23:45  @import
  node_modules\bootstrap-vue\src\index.scss 7:9         @import
  C:\Users\HP\gintest-vue\src\assets\scss\index.scss 3:9                                             root stylesheet

 @ ./src/assets/scss/index.scss 4:14-234 15:3-20:5 16:22-242
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://192.168.3.107:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

Vue引入scss文件报错 Syntax Error: SassError: Undefined variable.23 │ $b-custom-radio-indicator-border-rad_第1张图片

解决方法:将bootstrap降级到4,npm install [email protected] 或 yarn add [email protected]

参考 Error in bootstrap-vue/src/index.scss #5797
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 [email protected] instead, to specifically install the latest version of Bootstrap that BootstrapVue supports.

你可能感兴趣的:(平常,scss,vue.js)