Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot get schema for 'PrivateKeyInfo' target #50

Open
victorpayclip opened this issue Apr 27, 2022 · 3 comments
Open

Error: Cannot get schema for 'PrivateKeyInfo' target #50

victorpayclip opened this issue Apr 27, 2022 · 3 comments
Assignees

Comments

@victorpayclip
Copy link

victorpayclip commented Apr 27, 2022

I am generating keys with ecdh

const { Crypto } = require("@peculiar/webcrypto");
const crypto = new Crypto();

const { publicKey, privateKey } = await crypto.subtle.generateKey(
  {
    name: "ECDH",
    namedCurve: "P-256", // P-256, P-384, or P-521
  },
  true,
  ["deriveKey", "deriveBits"],
);

but when exporting them it throws me this error

Error: Cannot get schema for 'PrivateKeyInfo' target

Can someone guide me how to solve this problem?

@microshine
Copy link
Collaborator

Looks like your project uses multiple versions of @peculiar/asn1-schema. Please deduplicate dependences and try again

@markb-trustifi
Copy link

markb-trustifi commented Nov 17, 2022

It happens for me with the latest webcrypto version v1.4. When I switch strictly to the v1.3.3 without hat this error disappears.

@fej-snikduj
Copy link

Having this issue as well, even on 1.3.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants