-
Notifications
You must be signed in to change notification settings - Fork 247
Open
Description
Creating isolated issue for issue discovered as part of #2579
When project is using ESM modules and credo, it leads to runtime issues.
For reproduction checkout commit 13df6845bc4dc8c1671bf00698deed1658d10473 from repo https://github.com/Patrik-Stas/tsx-credo-06-reproduction/tree/main
If you run pnpm run test you should see in output
[ERROR] DID not created, didCreateResult: {
"didDocumentMetadata": {},
"didRegistrationMetadata": {},
"didState": {
"state": "failed",
"reason": "unknownError: Error creating key"
}
}
[ERROR] ❌ Script failed with error
but if you remove type: module it will succeed
[INFO] ✅ DID key created successfully
[INFO] DID: did:key:z6MkfnXzhM8iivsgd9774ZHCqKcXDkBEVnY9jwb2BQUFWqfH
[INFO] KID: did:key:z6MkfnXzhM8iivsgd9774ZHCqKcXDkBEVnY9jwb2BQUFWqfH#z6MkfnXzhM8iivsgd9774ZHCqKcXDkBEVnY9jwb2BQUFWqfH
[INFO] ✅ Script completed successfully
The repo is using simplest possible agent
const agent = new Agent({
config: {
logger: new SimpleLogger(logLevel),
},
dependencies: agentDependencies,
modules: {
askar: new AskarModule({
askar: askar,
store: {
id: walletId,
key: walletKey,
},
enableKms: true,
enableStorage: true, // Use Askar's default SQLite storage
}),
},
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels