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 'ObjectIdentifier' target #90

Open
dchocoboo opened this issue Mar 3, 2023 · 4 comments
Open

Error: Cannot get schema for 'ObjectIdentifier' target #90

dchocoboo opened this issue Mar 3, 2023 · 4 comments

Comments

@dchocoboo
Copy link

/node_modules/@peculiar/asn1-schema/build/cjs/schema.js:1
Error: Cannot get schema for 'ObjectIdentifier' target

  at AsnSchemaStorage.get (node_modules/@peculiar/asn1-schema/build/cjs/schema.js:17:19)
  at Function.toASN (node_modules/@peculiar/asn1-schema/build/cjs/serializer.js:24:48)
  at Function.serialize (node_modules/@peculiar/asn1-schema/build/cjs/serializer.js:14:21)
  at Function.serialize (node_modules/@peculiar/asn1-schema/build/cjs/convert.js:10:43)
  at Function.register (node_modules/webcrypto-core/build/webcrypto-core.js:1144:43)
  at Object.<anonymous> (node_modules/webcrypto-core/build/webcrypto-core.js:1170:10)
  at Object.<anonymous> (node_modules/@peculiar/webcrypto/build/webcrypto.js:7:12)
      at Object.<anonymous> (/node_modules/isomorphic-webcrypto/src/index.js:1)
      at Object.<anonymous> (/node_modules/isomorphic-webcrypto/src/main.js:1)
      at Object.<anonymous> (/node_modules/@pathcheck/dcc-sdk/lib/cose-js/sign.js:1)
      at Object.<anonymous> (/node_modules/@pathcheck/dcc-sdk/lib/dcc.js:1)
      at Object.<anonymous> (/node_modules/@pathcheck/dcc-sdk/lib/main.js:1)
@dchocoboo
Copy link
Author

dependencies version : 2.3.3

@microshine
Copy link
Contributor

Please check that you have only one instance of @peculiar/asn1-schema in your project. If it is not, deduplicate it.

npm list @peculiar/asn1-schema

@micwallace
Copy link

This same issue happens to me if i npm link to a library using asn1-schema. Might be something related to the symlinks used.

@microshine
Copy link
Contributor

This error occurs because the @peculiar/asn1-schema module registers schemas at the module variable level. If your project includes multiple versions of this module, the schemas might be registered in different instances, leading to this error.

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

3 participants