typescript SassError:找不到要导入的样式表-在Angular 15中进行构建并使用Kendo UI时出错

ohtdti5x  于 2022-12-14  发布在  TypeScript
关注(0)|答案(1)|浏览(307)

更新到angular 15后出现以下错误,并且还使用了剑道UI的UI控件。似乎是由于波浪号键贬值。

./src/styles.scss - Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Can't find stylesheet to import.
  ╷
3 │ @import "~@progress/kendo-theme-bootstrap/scss/grid/_index.scss";
  │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  src\assets\kendo-theme\kendo-imports.scss 3:9  @import
  src\styles.scss 3:9                            root stylesheet

./src/styles.scss?ngGlobalStyle - Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
HookWebpackError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Can't find stylesheet to import.
  ╷
3 │ @import "~@progress/kendo-theme-bootstrap/scss/grid/_index.scss";
  │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  src\assets\kendo-theme\kendo-imports.scss 3:9  @import
  src\styles.scss 3:9                            root stylesheet

我尝试删除波浪号键(~),但在Kendo UI的node_module库中有许多波浪号引用

u4vypkhs

u4vypkhs1#

将导入行更改为:@import "node_modules/@progress/kendo-theme-bootstrap/scss/grid/_index.scss";

相关问题