Ngx-toastr: InjectFlags still causing errors on angular 5

Created on 17 Aug 2018  路  3Comments  路  Source: scttcper/ngx-toastr

Using version 9.0.2 from npm:

https://github.com/scttcper/ngx-toastr/commit/a8ac1aecb6df3aec03d627f91ba9278c1374aabf was supposed to fix this issue.

ERROR in node_modules/ngx-toastr/toastr/toast-injector.d.ts(1,20): error TS2305: Module '"/path/to/source/node_modules/@angular/core/core"' has no exported member 'InjectFlags'

Most helpful comment

This was intentional. Check out the release of version 9 (breaking changes) https://github.com/scttcper/ngx-toastr/releases/tag/v9.0.0

If you need Angular 5 support, stay on the latest version of version 8.

All 3 comments

This was intentional. Check out the release of version 9 (breaking changes) https://github.com/scttcper/ngx-toastr/releases/tag/v9.0.0

If you need Angular 5 support, stay on the latest version of version 8.

Ah, my mistake sorry!

Problem: is your version of angular is 5 here and the version of the library you are using are incompatible. In our case I was facing same issue for with angular 5 and ngx-toastr.

Solution is just use the right version for your angular.

npm install ngx-toastr@^8.4.0 --save

Was this page helpful?
0 / 5 - 0 ratings