libsodium.js icon indicating copy to clipboard operation
libsodium.js copied to clipboard

TypeError: Cannot read property 'Qb' of undefined

Open ehamery opened this issue 3 years ago • 0 comments

Hi, I am trying to use libsodium-wrappers in Typescript with:

import libsodium from 'libsodium-wrappers';

I am doing this in several files where I use libsodium. But then if I import more than 1 of those files in the same file, any call to await libsodium.ready throws an exception:

TypeError: Cannot read property 'Qb' of undefined
    at Object.I._crypto_sign_seedbytes (/test/node_modules/libsodium/dist/modules/libsodium.js:1:316118)
    at Object.Bt [as crypto_sign_seed_keypair] (/test/node_modules/libsodium-wrappers/dist/modules/libsodium-wrappers.js:1:64050)

The object that is not defined is I.asm

Any idea what may cause that? And how I can fix it? Any help would be much appreciated.

ehamery avatar Jan 24 '22 04:01 ehamery