transmute-industries / did-key.js

A DID Key Implementation in TypeScript
https://did.key.transmute.industries/
Apache License 2.0
53 stars 15 forks source link

TypeError: Function.prototype.apply was called on undefined when importing @transmute/did-key-ed25519 in Node.js v22.2.0 #308

Open xiguaakako opened 2 months ago

xiguaakako commented 2 months ago

Hello,

I encountered an issue when trying to import the @transmute/did-key-ed25519 module in Node.js v22.2.0. The following error occurs:

TypeError: Function.prototype.apply was called on undefined, which is a undefined and not a function

However, the same import works successfully in Node.js v18.7.0 without any errors.

Steps to Reproduce:

Create a file named testED26619.js with the following content:

import * as ed25519 from "@transmute/did-key-ed25519";

Run the file using Node.js v22.2.0:

node testED26619.js

Observe the TypeError mentioned above.

Expected Behavior:

The module should be imported successfully without any errors, as it does in Node.js v18.7.0.

Actual Behavior:

The following TypeError is thrown: TypeError: Function.prototype.apply was called on undefined, which is a undefined and not a function Environment:

Node.js version: v22.2.0 Operating System: MacOS @transmute/did-key-ed25519 version: "@transmute/did-key-ed25519": "^0.3.0-unstable.10",

Additional Information:

The issue does not occur in Node.js v18.7.0, where the import works as expected.

Thank you for your assistance in resolving this issue.