简体   繁体   English

Angular 6 - 安装 ng-recaptcha 给出错误 TS1005: ';' 预期的

[英]Angular 6 - Installing ng-recaptcha gives error TS1005: ';' expected

I want to use ReCaptcha V3 in my Angular 6 project so I have installed ng-recaptcha using the command npm i ng-recaptcha --save as per the doc https://www.npmjs.com/package/ng-recaptcha#installation . I want to use ReCaptcha V3 in my Angular 6 project so I have installed ng-recaptcha using the command npm i ng-recaptcha --save as per the doc https://www.npmjs.com/package/ng-recaptcha#installation .

After the installation, the error "ng-recaptcha@7.0.1 requires a peer of @angular/core@^11.0.0 but none is installed" displayed but I don't want to upgrade "@angular/core" to 11.0.0 as my current project uses 6.1.0.安装后,显示错误“ng-recaptcha@7.0.1 requires a peer of @angular/core@^11.0.0 but none is installed”,但我不想将“@angular/core”升级到 11.0。 0 因为我当前的项目使用 6.1.0。

When I try to run the application it is giving the error ERROR in node_modules/ng-recaptcha/recaptcha/recaptcha.component.d.ts(5,43): error TS1005: ';'当我尝试运行应用程序时,它在 node_modules/ng-recaptcha/recaptcha/recaptcha.component.d.ts(5,43) 中给出错误 ERROR: error TS1005: ';' expected预期的

I am not sure whether any lesser version of ng-recaptcha will resolve my problem or not.我不确定是否有任何较小版本的 ng-recaptcha 可以解决我的问题。 Please help请帮忙

Version 6.1 of ng-recaptch needs Angular version 6 and up ng-recaptch 6.1 版本需要 Angular 版本 6 及更高版本

  "peerDependencies": {
    "@angular/core": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0"
  },

https://github.com/DethAriel/ng-recaptcha/tree/v6.1.0 try to install it instead https://github.com/DethAriel/ng-recaptcha/tree/v6.1.0尝试安装它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM