question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleWithProviders type without a generic type argument - Angular ~9.0.0-rc.6

See original GitHub issue

Everything is working as expected so it seems but i get this “Error”

ERROR in node_modules/ngx-toastr/toastr/toastr.module.d.ts:5:53 - error TS-996005: ToastrModule.forRoot returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.

"ngx-toastr": "^11.2.1"

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
LEZIER-S2commented, Oct 13, 2020

my bad your code is fine. It’s a transient dependency of an older version of toastr that cause the building error.

0reactions
ricardosaracinocommented, Oct 13, 2020

My version seems up to date “ngx-toastr”: “^13.1.0”, but still have the issue with Angular 10: node_modules/ngx-loading/lib/ngx-loading.module.d.ts:4:55 - error TS2314: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s)

this is working for me

 "dependencies": {
    "@angular/animations": "^10.1.4",
    "@angular/common": "^10.1.4",
    "@angular/compiler": "^10.1.4",
    "@angular/core": "^10.1.4",
    "@angular/forms": "^10.1.4",
    "@angular/localize": "^10.1.4",
    "@angular/platform-browser": "^10.1.4",
    "@angular/platform-browser-dynamic": "^10.1.4",
    "@angular/router": "^10.1.4",
    "@coreui/angular": "^2.9.4",
    "@coreui/coreui": "^2.1.16",
    "@ng-bootstrap/ng-bootstrap": "^7.0.0",
    "@ngx-loading-bar/core": "^5.1.0",
    "@ngx-loading-bar/http-client": "^5.1.0",
    "@ngx-loading-bar/router": "^5.1.0",
    "class-transformer": "^0.2.3",
    "core-js": "^3.6.4",
    "font-awesome": "^4.7.0",
    "moment-timezone": "^0.5.31",
    "ngx-cookie-service": "^2.2.0",
    "ngx-loading-bar": "0.0.9",
    "ngx-toastr": "^13.1.0",
    "rxjs": "^6.6.3",
    "tslib": "^2.0.2",
    "zone.js": "~0.10.3"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.1001.2",
    "@angular/cli": "^10.1.4",
    "@angular/compiler-cli": "^10.1.4",
    "@angular/language-service": "^10.1.4",
    "@compodoc/compodoc": "^1.1.11",
    "@ngx-i18nsupport/ngx-i18nsupport": "^1.1.6",
    "@ngx-i18nsupport/tooling": "^8.0.3",
    "@types/jasmine": "~3.4.0",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^12.12.64",
    "codelyzer": "^6.0.1",
    "jasmine-core": "~3.5.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~5.0.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~3.3.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "karma-junit-reporter": "^2.0.1",
    "protractor": "~7.0.0",
    "ts-node": "~8.3.0",
    "tslint": "^6.1.3",
    "typescript": "~3.9.7"
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular error - Generic type 'ModuleWithProviders<T ...
I got to know that ngx-bootstrap is not compatible with angular 10 right now, 6.0.0 version of ngx-bootstrap will be compatible with angular...
Read more >
ModuleWithProviders type without a generic type argument
ModuleWithProviders type without a generic type argument - Angular ~9.0.0-rc.6.
Read more >
ModuleWithProviders Migration - Angular
Angular version 9 deprecates use of ModuleWithProviders without an explicitly generic type, where the generic type refers to the type of the NgModule...
Read more >
How To Update Angular CLI To Latest Version
And Angular CLI 6 no longer uses intl in polyfills.ts . ... As of Angular 10, the ModuleWithProviders type requires a generic.
Read more >
Guide Leading Up to Angular 9.0.0 Release - HUSPI
The Angular 9.0.0-rc.10 version came out with a few bug fixes. ... Ivy now supports simple generic type constraints in local type ctors....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found