Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
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

Description

@aparna999

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions