After upgrading my Angular application from version 12 to version 17, I encountered the following error related to Sass imports when trying to build the project:
`./src/app/shared/styles/frameworks/bootstrap.scss - Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js): Can't find stylesheet to import. ╷ 1 │ @import 'node_modules/bootstrap/scss/functions'; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ node_modules@tes\css-framework\sass\libs\bootstrap_style.scss 1:9 @import @tes\css-framework\bootstrap.scss 5:9 @import src\app\shared\styles\frameworks\bootstrap.scss 1:9 root stylesheet
./src/app/shared/styles/frameworks/bootstrap.scss - 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): Can't find stylesheet to import. ╷ 1 │ @import 'node_modules/bootstrap/scss/functions'; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `
This problem only occurs after upgrading Angular to version 17. How can I resolve this Sass import error and successfully build my Angular project with Bootstrap after the upgrade?
Thanks in advance for your help!
A tryed:
"stylePreprocessorOptions": {
"includePaths": ["node_modules"]
}