-
Notifications
You must be signed in to change notification settings - Fork 435
Description
Update: contrary to how this bug report started, this is actually a documentation issue, as explored below, in the comments.
Original report below:
Impacted Library name
ledger-live-desktop
Impacted Library version
2.122.1
Describe the bug
I am trying to build the app following directions at https://developers.ledger.com/docs/ledger-live/accounts/beginner/live-build, using Node.js v20.19.2.
This is what I did:
git clone https://github.com/LedgerHQ/ledger-live.git
cd ledger-live/
git checkout @ledgerhq/live-desktop@2.122.1
pnpm install
cd apps/ledger-live-desktop/
pnpm install
pnpm build
The dependency installation was fine, but then, during the actual building
$pnpm build
> ledger-live-desktop@2.122.1 build <path>/ledger-live/apps/ledger-live-desktop
> cross-env CSC_IDENTITY_AUTO_DISCOVERY=false STAGING=1 node ./tools/dist --nosign -v
[02:36:03] Cleanup [started]
[02:36:03] Remove `.turbo/cache` folder [started]
[02:36:03] Remove `.turbo/cache` folder [completed]
[02:36:03] Remove `.webpack` folder [started]
[02:36:03] Remove `.webpack` folder [completed]
[02:36:03] Remove `dist` folder [started]
[02:36:03] Remove `dist` folder [completed]
[02:36:03] Cleanup [completed]
[02:36:03] Build [started]
[02:36:03] Compiling assets [started]
> ledger-live-desktop@2.122.1 build:js <path>/ledger-live/apps/ledger-live-desktop
> cross-env NODE_ENV=production node ./tools/main.js build
Found the following native modules: [
'<path>/ledger-live/node_modules/.pnpm/secp256k1@4.0.3/node_modules/secp256k1'
]
✘ [ERROR] Could not resolve "@ledgerhq/ethereum-provider"
src/webviewPreloader/dappPreloader.ts:2:27:
2 │ import { onPageLoad } from "@ledgerhq/ethereum-provider";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@ledgerhq/ethereum-provider" as external to exclude it from the bundle,
which will remove this error and leave the unresolved path in the bundle.
Expected behavior
I expected the app to build normally.
If the dependency on node v18 is strict, then I would expect to have a check near the beginning of the build process, pointing out that the system has an incompatible version of node.js
Or, I would expect node-env to be used, so that the version of node.js can be controlled by the the build scripts themselves.
Additional context
No response