When trying to generate headers using node-rsa, I get the following error:
[nuxt] [request error] this[D].init is not a function at new Sign (https://nuxt-starter-jzgdht.w.staticblitz.com/blitz.331c80ffab288536319518a60349d00207075dad.js:6:1135208) at Object.createSign (https://nuxt-starter-jzgdht.w.staticblitz.com/blitz.331c80ffab288536319518a60349d00207075dad.js:6:808197) at Scheme.sign (./node_modules/node-rsa/src/schemes/pkcs1.js:152:32)
at RSAKey.module.exports.Key.RSAKey.sign (./node_modules/node-rsa/src/libs/rsa.js:264:40) at NodeRSA.module.exports.NodeRSA.sign (./node_modules/node-rsa/src/NodeRSA.js:318:32) at generateWalmartHeaders (./.nuxt/dev/index.mjs:446:28) at eval (./.nuxt/dev/index.mjs:458:14) at eval (./node_modules/h3/dist/index.mjs:364:14) at Object.eval [as handler] (./node_modules/h3/dist/index.mjs:564:12) at eval (./node_modules/h3/dist/index.mjs:475:31) [nuxt] [request error] this[D].init is not a function at new Sign (https://nuxt-starter-jzgdht.w.staticblitz.com/blitz.331c80ffab288536319518a60349d00207075dad.js:6:1135208) at Object.createSign (https://nuxt-starter-jzgdht.w.staticblitz.com/blitz.331c80ffab288536319518a60349d00207075dad.js:6:808197) at Scheme.sign (./node_modules/node-rsa/src/schemes/pkcs1.js:152:32)
at RSAKey.module.exports.Key.RSAKey.sign (./node_modules/node-rsa/src/libs/rsa.js:264:40) at NodeRSA.module.exports.NodeRSA.sign (./node_modules/node-rsa/src/NodeRSA.js:318:32) at generateWalmartHeaders (./.nuxt/dev/index.mjs:446:28) at eval (./.nuxt/dev/index.mjs:458:14) at eval (./node_modules/h3/dist/index.mjs:364:14) at Object.eval [as handler] (./node_modules/h3/dist/index.mjs:564:12) at eval (./node_modules/h3/dist/index.mjs:475:31)
When trying to generate headers using
node-rsa
, I get the following error:My code implemention is:
Anyone have any idea how I can fix this? Stackoverflow post: https://stackoverflow.com/questions/72111954/error-exporting-a-function-when-using-nuxt3-nitro-engine