Open edugrip opened 1 year ago
If you are using import syntax, change it to express one. Like this: const speakeasy = require('speakeasy');
Quick solution: go to the source of this and change this.generateSecretASCII
to exports.generateSecretASCII
. But later, if it gets overwritten, the problem will recur, so I suggest creating a pull request for this, and fix it permanently.
When I try to create the image, with the following code, var secret = generateSecret({ name: "mySecret", })
The line 458 in index.js generates an error .... var key = this.generateSecretASCII(length, symbols);
this
is undefined here. (I get an errorcan't read property generateSecretASCII of undefined
) When I change this toexports
, it works. team, kindly find out and guide to fix the issue.