gpt4 book ai didi

javascript - 类型错误 : Recaptcha is not a constructor

转载 作者:行者123 更新时间:2023-11-30 11:06:08 25 4
gpt4 key购买 nike

突然,我的应用程序由于此类型错误而停止编译:Recaptcha 不是构造函数。

    recaptchaConfig() {
this.recaptcha = new Recaptcha(
config.service.recaptcha.client_key,
config.service.recaptcha.secret_key ,
{...config.service.recaptcha.options}
);
}

它工作得很好,现在我不知道是什么原因造成的。 https://github.com/arya107/AskArya-Node.js-Vue.js/blob/master/Server/app/http/controllers/controller.js

最佳答案

刚刚尝试了您的代码并使用:

var Recaptcha = require('express-recaptcha').Recaptcha;

遇到 sam 异常,但如果您尝试:

var Recaptcha = require('express-recaptcha').RecaptchaV3;

成功了,试试吧。

关于javascript - 类型错误 : Recaptcha is not a constructor,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55531348/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com