captcha-com / angular-captcha

BotDetect CAPTCHA: Angular Captcha Module (TypeScript: Angular 2/4/5/6/7/8+).
https://captcha.com/angular-captcha.html
16 stars 9 forks source link

Generic type 'ModuleWithProviders<T>' requires 1 type argument(s) error with Typescript 5.0+ and Angular 16+ #11

Open zrsio4 opened 1 year ago

zrsio4 commented 1 year ago

I updated my projects to use Angular 16.1.4 with Typescript 5.1.6. Now I get these build errors:

Error: node_modules/angular-captcha/src/botdetect-captcha.module.d.ts:4:46 - error TS2314: Generic type 'ModuleWithProviders' requires 1 type argument(s).

Error: projects/shared-portals/src/lib/shared-portals.module.ts:66:9 - error NG6002: 'BotDetectCaptchaModule' does not appear to be an NgModule class.

66 BotDetectCaptchaModule,


  node_modules/angular-captcha/src/botdetect-captcha.module.d.ts:3:22
    3 export declare class BotDetectCaptchaModule {
This likely means that the library (angular-captcha) which declares BotDetectCaptchaModule is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

Am I missing something, or is angular-captcha unable to support Angular 16 + Typescript 5?