无法在 Laravel 8 bootstrap 上编译 sass 个文件

Not able to compile sass files on Laravel 8 bootstrap

当我尝试在 laravel 版本 8 上编译 bootstrap 脚手架时,出现以下错误

node_modules\bootstrap\scss\mixins\_grid.scss 67:16            row-cols()
    node_modules\bootstrap\scss\mixins\_grid-framework.scss 43:13  @content
    node_modules\bootstrap\scss\mixins\_breakpoints.scss 65:5      media-breakpoint-up()
    node_modules\bootstrap\scss\mixins\_grid-framework.scss 32:5   make-grid-columns()
    node_modules\bootstrap\scss\_grid.scss 72:3                    @import
    node_modules\bootstrap\scss\bootstrap.scss 16:9                @import
    resources\sass\app.scss 8:9                                    root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(100%, $count)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
66 │     flex: 0 0 100% / $count;
   │               ^^^^^^^^^^^^^
   ╵
    node_modules\bootstrap\scss\mixins\_grid.scss 66:15            row-cols()
    node_modules\bootstrap\scss\mixins\_grid-framework.scss 43:13  @content
    node_modules\bootstrap\scss\mixins\_breakpoints.scss 65:5      media-breakpoint-up()
    node_modules\bootstrap\scss\mixins\_grid-framework.scss 32:5   make-grid-columns()
    node_modules\bootstrap\scss\_grid.scss 72:3                    @import
    node_modules\bootstrap\scss\bootstrap.scss 16:9                @import
    resources\sass\app.scss 8:9                                    root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

有人可以帮忙解决这个问题吗?谢谢

您在 /resources/sass/app.scss 中有语法错误。打开文件并搜索 flex: 0 0 100% / $count; Replace with flex: 0 0 math.div(100%, $count) 如果它不存在,那么你的 bootstrap 版本有损坏的更改尝试更新

版本相关见已接受的答案

引用https://sass-lang.com/d/slash-div

暂时不要使用版本 1.33.0, use the version before that 1.32.13。 在您的 package.json "sass": "1.32.13" 上更改它 并等待下个版本的修复。