orbitdb-archive / orbit-db-identity-provider

Default identity provider for OrbitDB
MIT License
31 stars 17 forks source link

did-jwt Module parse failed when importing library #76

Closed constantgillet closed 2 years ago

constantgillet commented 2 years ago
./node_modules/did-jwt/lib/index.module.js 1720:17
Module parse failed: Unexpected token (1720:17)
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|               // TODO: should be able to use non base58 keys too
|               return key.type === 'X25519KeyAgreementKey2019' && Boolean(key.publicKeyBase58);
>             })) ?? [];
|             if (!pks.length && !controllerEncrypters.length) throw new Error(`no_suitable_keys: Could not find x25519 key for ${did}`);
|             return pks.map(pk => x25519Encrypter(base58ToBytes(pk.publicKeyBase58), pk.id)).concat(...controllerEncrypters);

I am trying to import orbit-db-identity-provider in a create-react-app app but did-jwt module parse fail when I import it.

Does anyone have an idea?

sanderPostma commented 2 years ago

Did you solved this?

techster10173 commented 2 years ago

Is this solved? Please assist with the solution.

silkroadnomad commented 2 years ago

I downgraded from 0.4.0 to orbit-db-identity-provider@0.3.0 and the error disappears. I don't really know what if there is a side effect with it.