Closed AnCoSONG closed 2 years ago
import WxPay from 'wechatpay-node-v3'
fails and show error like thiswechatpay_node_v3_1.default is not a constructor
.Currently I fix this problem by editing the node module with following codes:
// in index.d.js export = Pay; export default Pay; // add this // in index.js module.exports = Pay; module.exports.default = Pay; // add this
你用的是不是nestjs框架,他这个有个特殊的类型检查,推荐先用require过渡一下,我正在集成把当前npm包集成nestjs
已经支持好了 npm install nest-wechatpay-node-v3
import WxPay from 'wechatpay-node-v3'
fails and show error like thiswechatpay_node_v3_1.default is not a constructor
.Currently I fix this problem by editing the node module with following codes: