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

[Bug]: "Initialize Device Management Kit" documentation page outdated #8679

Open
mcmxcdev opened this issue Dec 12, 2024 · 0 comments
Open
Labels
bug Something isn't working libraries Impacts the Libraries triage In need of triage

Comments

@mcmxcdev
Copy link

Impacted Library name

@ledgerhq/device-management-kit

Impacted Library version

0.5.1

Describe the bug

As can be seen in the screenshot, the basic example on https://developers.ledger.com/docs/device-interaction/beginner/init_dmk imports three different imports.

image

DeviceSdk is completely unused so shouldn't be in that code snippet and DeviceSdkBuilder doesn't even exist.

I assume DeviceSdkBuilder should be replaced with DeviceManagementKitBuilder import.

But even when correcting it, the library is unusuable and breaks the application breaks with:

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '<home>/node_modules/@ledgerhq/device-management-kit/lib/esm/src' is not supported resolving ES modules imported from <home>/node_modules/@ledgerhq/device-management-kit/lib/esm/index.js
    at finalizeResolution (node:internal/modules/esm/resolve:251:11)
    at moduleResolve (node:internal/modules/esm/resolve:913:10)
    at defaultResolve (node:internal/modules/esm/resolve:1037:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:650:12)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:599:25)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:582:38)
    at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:241:38)
    at ModuleJob._link (node:internal/modules/esm/module_job:132:49)

Expected behavior

Documentation should be correct and imports should not break the application

Additional context

No response

@mcmxcdev mcmxcdev added bug Something isn't working libraries Impacts the Libraries triage In need of triage labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working libraries Impacts the Libraries triage In need of triage
Projects
None yet
Development

No branches or pull requests

1 participant