Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Error after upgrading to Angular 9 - ModuleWithProviders requiring to explicitly specify generic type #250

Closed
aparna999 opened this issue Mar 11, 2020 · 1 comment

Comments

@aparna999
Copy link

aparna999 commented Mar 11, 2020

Hi,

This error occured after I upgraded my project to Angular version 9 and ran ng build --prod

ERROR in Failed to compile entry-point "name of project' (es2015 as esm2015) due to compilation errors:
node_modules/angular-in-memory-web-api/http-client-in-memory-web-api.module.d.ts:29:97 - error NG6005: HttpClientInMemoryWebApiModule.forFeature 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.

29 static forFeature(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders;

My package.json has the latest version
"angular-in-memory-web-api": "^0.9.0"

Looks like the latest version of this library is not compatible with Angular 9 version.
Angular suggests that ModuleWithProviders needs a generic type.

Reference : https://angular.io/guide/migration-module-with-providers

Can someone fix this and make a release soon?

Thanks,
Aparna

@aparna999
Copy link
Author

aparna999 commented Mar 11, 2020

Looks like there is a PR pending #245

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

No branches or pull requests

1 participant