Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 10 || 11 and Ionic 5: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s) error #460

Closed
almothafar opened this issue Jan 26, 2021 · 1 comment · Fixed by #463

Comments

@almothafar
Copy link

almothafar commented Jan 26, 2021

Describe the bug
While building production app for ionic 5 with Angular 10 or 11 I get an error with Generic type 'ModuleWithProviders<T>' requires 1 type argument(s) error

To Reproduce
Just upgrade your app to Angular 10 or above (which is used in Ionic 5).

Screenshots

image

Desktop (please complete the following information):

  • OS: Windows 10 Pro 64-bit & Ubuntu 20.4
  • Browser does not matter as it is build process
  • Version ^7.0.8

Additional context
The component working fine in Ionic 5 actually with latest angular (version 11), and I can workaround this issue by adding the following code to app.module.ts:

declare module '@angular/core' {
	interface ModuleWithProviders<T = any> {
		ngModule: Type<T>;
		providers?: Provider[];
	}
}
@almothafar almothafar changed the title Angular 11 Angular 10 || 11 and Ionic 5: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s) error Jan 26, 2021
@Juneezee
Copy link
Contributor

I have created a pull request #463 that corrects this error.

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

Successfully merging a pull request may close this issue.

2 participants