ngx-toastr - Generic type 'ɵɵComponentDeclaration' requires between 7 and 8 type arguments

3.5k views Asked by At

I have installed ngx-toastr and imported in app.module.ts but getting this error while compiling enter image description here...is it because i have set the properties of toaster in service file which I created like below?enter image description here

I tried adding @import '~ngx-toastr/toastr.css'; in styles.css still no effect. Does anyone know what might be the reason for this error and how to fix it

2

There are 2 answers

1
Jhonatan Martinez On

you should try to uninstall your current version ngx-toastr, then try to install another version, I installed version 15.2.0 npm install --save [email protected], that works for me.

1
Shravani Radhakrishna On

This version worked for me "ngx-toastr": "^14.2.1",