Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Can't resolve '~ngx-toastr/toastr.css' in #1014

Open
ankit-1999 opened this issue Mar 19, 2024 · 4 comments
Open

Error: Can't resolve '~ngx-toastr/toastr.css' in #1014

ankit-1999 opened this issue Mar 19, 2024 · 4 comments

Comments

@ankit-1999
Copy link

Using angular version 17.0.0 and ngx-toastr version 18.0.0.

getting this error:

./src/styles.scss - Error: Module build failed (from ./node_modules/css-loader/dist/cjs.js):
Error: Can't resolve '~ngx-toastr/toastr.css' in

./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/css-loader/dist/cjs.js):
Error: Can't resolve '~ngx-toastr/toastr.css' in

@openbridge-james
Copy link

I am also getting this problem, but with the version for Angular 15... and ngx-toastr 16...

@openbridge-james
Copy link

I was able to get around it by using

@import "./../node_modules/ngx-toastr/toastr.css";

instead of

@import "~ngx-toastr/toastr.css";

@geezz07
Copy link

geezz07 commented Apr 23, 2024

Does this work, @import "ngx-toastr/toastr.css";

@openbridge-james
Copy link

Does this work, @import "ngx-toastr/toastr.css";

No, look at my answer for a fix to the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants