Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

TypeError: (intermediate value).Crypto is not a constructor #162

Open
@dtruffaut

Description

@dtruffaut
const main = async () => {
  const crypto = new (await import('node-webcrypto-ossl')).Crypto();
}
main();

TypeError: (intermediate value).Crypto is not a constructor

NB : I cannot use require() since the library using this is a shared library between front and back, and I make a test on window to determine if I use window.crypto (front) or if I dynamically import node-webcrypto-ossl (server). Plus, ES2020 modules do not support require().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions