-
Notifications
You must be signed in to change notification settings - Fork 38
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
ng-hcaptcha error TS2344: Type '{ siteKey: { alias: "siteKey"; required: false; } #63
Comments
Hi @dedol1, thank you for reporting this issue! Which version of Angular do you use? |
I am using angular 16.0.2 |
I just ran into the same error with angular 15 and hcaptcha 2.1.0. It came out of nowhere as I only made some small and completely unrelated changes. I tried to delete my node_modules and downloading them back, upgrading hcpatcha to 2.2.0, but the error was still there. Finally I tried to checkout an older commit in my project and then the error disappeared. Checked out my last changes and it kept working. Not sure what happened. |
I am facing the same issue, using Angular 15 and ng-hcaptcha 2.2.0. Did we find any solution ? |
I still haven't been able to identify what the issue is, kindly post your findings here in case you do come across any. I will also do same |
same problem... |
Same problem here. I had to downgrade to version 1.+ |
@dedol1 @NicoBrg-WDG @PetarBase @ArthurIbias @alexsukhodolsky Thank you for reporting this issue! I haven't been able to find the root cause yet but I'm going to take some time for it tomorrow 👍 |
@leNicDev have you find any solution for this ? Thanks |
downgrade the ng hcaptcha 2.2.0 to 2.1.0, solution works for me. |
dropping some info here: I feel like it is related to the version of node you are using to compile. Unfortunately I do not have much time to run additional tests. |
Hi there, i had this issue with the following configuration : Downgrading ng-hcaptcha to 2.1.0 fixed the issue for me. I guess 2.2.0 is just simply incompatible with angular 15 ? |
I get the below error when I add : <ng-hcaptcha (verify)="onVerify($event)" (expired)="onExpired($event)"
(error)="onError($event)">
to my component.html file.
Error: ../node_modules/ng-hcaptcha/lib/ng-hcaptcha-invisible-button.directive.d.ts:39:118 - error TS2344: Type '{ siteKey: { alias: "siteKey"; required: false; }; languageCode: { alias: "languageCode"; required: false; }; }' does not satisfy the constraint '{ [key: string]: string; }'.
Property '"siteKey"' is incompatible with index signature.
Type '{ alias: "siteKey"; required: false; }' is not assignable to type 'string'.
39 static ɵdir: i0.ɵɵDirectiveDeclaration<NgHcaptchaInvisibleButtonDirective, "[ngHcaptchaInvisibleButton]", never, { "siteKey": { "alias": "siteKey"; "required": false; }; "languageCode": { "alias": "languageCode"; "required": false; }; }, { "verify": "verify"; "expired": "expired"; "error": "error"; "click": "click"; }, never, never, false, never>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: ../node_modules/ng-hcaptcha/lib/ng-hcaptcha.component.d.ts:48:87 - error TS2344: Type '{ siteKey: { alias: "siteKey"; required: false; }; theme: { alias: "theme"; required: false; }; size: { alias: "size"; required: false; }; tabIndex: { alias: "tabIndex"; required: false; }; languageCode: { ...; }; }' does not satisfy the constraint '{ [key: string]: string; }'.
Property '"siteKey"' is incompatible with index signature.
Type '{ alias: "siteKey"; required: false; }' is not assignable to type 'string'.
48 static ɵcmp: i0.ɵɵComponentDeclaration<NgHcaptchaComponent, "ng-hcaptcha", never, { "siteKey": { "alias": "siteKey"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "size": { "alias": "size"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "languageCode": { "alias": "languageCode"; "required": false; }; }, { "verify": "verify"; "expired": "expired"; "error": "error"; }, never, never, false, never>;
The text was updated successfully, but these errors were encountered: