Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't import the styles.scss file from angular-notifier into my project

Tags:

angular

I can't import the styles.scss file from angular-notifier into my project.

Here is my error:

Module build failed (from ./node_modules/sass-loader/dist/cjs.js): SassError:
Can't find stylesheet to import. ╷ 10 │ @import" ~/angular-notifier/styles.scss"; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ src/styles.scss 10:8 root stylesheet

ERROR in ./src/styles.scss

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. ╷ 10 │ @import" ~/angular-notifier/styles.scss"; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ src/styles.scss 10:8 root stylesheet
like image 915
HAMED M. SOUMAHORO Avatar asked Sep 11 '25 23:09

HAMED M. SOUMAHORO


1 Answers

I had the same problem in Angular 13, it won't resolve ~ for some reason

If you change import to @import "node_modules/angular-notifier/styles"; it will work

Also you can try @import "~angular-notifier/styles";, it should work, but I haven't tested it

like image 93
Vasia Zaretskyi Avatar answered Sep 15 '25 00:09

Vasia Zaretskyi