Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

TypeError: KeyEncoder is not a constructor #16

Open
@xird

Description

@xird

I'm trying to use the library, but can't even get started due to an error: "TypeError: KeyEncoder is not a constructor"

To reproduce:

  • In a new directory, npm init
  • npm i key-encoder
  • In index.js, add just the two lines from the README:
var KeyEncoder = require('key-encoder'),
    keyEncoder = new KeyEncoder('secp256k1')
  • run "node index.js"

Result:

    keyEncoder = new KeyEncoder('secp256k1')
                 ^

TypeError: KeyEncoder is not a constructor

Expected result: No output.

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