I'm facing an issue with decrypting the ApplePay token in my Vue app, using a specific package. The error message I'm receiving is quite puzzling and I'm struggling to comprehend it.
Simply checking if the package is installed by running this snippet:
mounted() {
const PaymentToken = require('apple-pay-decrypt');
console.log(PaymentToken);
},
But I'm encountering this error:
Uncaught Error: Cannot find module './build/Release/x509'
at webpackMissingModule (index.js?b266:1)
at eval (index.js?b266:1)
at Object../node_modules/x509/index.js (chunk-vendors.js:13419)
at __webpack_require__ (app.js:785)
at fn (app.js:151)
at Object.eval (index.js?da5a:1)
at eval (index.js:110)
at Object../node_modules/apple-pay-decrypt/index.js (chunk-vendors.js:274)
at __webpack_require__ (app.js:785)
at fn (app.js:151)
Although x509 does exist in node_modules and .build/Realse/x509 also exists, it actually contains a file named x509.node, not a .js file.
If anyone has any insights on how to resolve this issue, I would greatly appreciate the help.