You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i'm not understanding why i can't use it in NodeJS (an express app). The module gets exported as a promise? VSCode lets me jump to the .d.ts file...
// UnhandledPromiseRejectionWarning: Error: Not supportedvarBLAKE2s=import('blake2s-js');vargen={hash: function(msg,key){varhash;// TypeError: BLAKE2s is not a constructorhash=newBLAKE2s(32,key);hash.update(msg);returnhash.digest();}};module.exports=gen;
Solution: use require() not import().
Leaving open because i still need to do some with TextEncoder/TextDecoder and/or Uint8Array...
The text was updated successfully, but these errors were encountered:
Hi, i'm not understanding why i can't use it in NodeJS (an express app). The module gets exported as a promise? VSCode lets me jump to the .d.ts file...
Solution: use
require()
notimport()
.Leaving open because i still need to do some with
TextEncoder
/TextDecoder
and/orUint8Array
...The text was updated successfully, but these errors were encountered: