ERROR: module node_modules/@angular/core/core has no exported member 'InjectFlags'

Error Cause:

  • Problem: Your version of angular and the version of the library you are using are incompatible
  • Solution: Just use the right version for your angular

Example with ngx-toastr for Angular 5:

npm install ngx-toastr@^8.4.0 --save