错误如下: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

在这里插入图片描述

解决方法:将bootstrap降级到4,npm install bootstrap@4.5.3 或 yarn add bootstrap@4.5.3

参考 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 bootstrap@4.5.3 instead, to specifically install the latest version of Bootstrap that BootstrapVue supports.

Logo

前往低代码交流专区

更多推荐