Skip to content

fix(wallet): build the local SDK before bundling so a fresh clone works#77

Merged
marinom2 merged 1 commit into
mainfrom
fix/wallet-build-from-clean-clone
Jun 10, 2026
Merged

fix(wallet): build the local SDK before bundling so a fresh clone works#77
marinom2 merged 1 commit into
mainfrom
fix/wallet-build-from-clean-clone

Conversation

@marinom2

Copy link
Copy Markdown
Owner

Fixes the npm run build failure on a fresh clone:

Failed to resolve entry for package "lightnode-sdk"

Cause: the wallet depends on lightnode-sdk via file:../sdk, but sdk/dist is a gitignored build artifact and npm only has the stale 0.10.8 (local is 0.18.3). A fresh clone had no dist to resolve. It only worked in environments where sdk/dist was already built.

Fix: mirror the root app's prebuild pattern - a prebuild/predev step that installs + builds the local SDK first, so npm run build produces sdk/dist before WXT bundles. Verified by deleting sdk/dist and running a clean npm run build end to end (it rebuilds the SDK, then the extension).

The documented install (cd wallet && npm install && npm run build) now works from a clean clone with no extra steps.

The wallet depends on lightnode-sdk via file:../sdk, but sdk/dist is a
gitignored build artifact and npm only has the stale 0.10.8 (local is 0.18.3),
so a fresh clone had no dist to resolve and `npm run build` failed with
"Failed to resolve entry for package lightnode-sdk".

Mirror the root app's pattern: a prebuild (and predev) step that installs +
builds the local SDK first, so `npm run build` produces sdk/dist before wxt
bundles. Verified by removing sdk/dist and running a clean build end to end.
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lightnode Ready Ready Preview, Comment Jun 10, 2026 3:21pm

Request Review

@marinom2 marinom2 merged commit b9d080b into main Jun 10, 2026
5 checks passed
@marinom2 marinom2 deleted the fix/wallet-build-from-clean-clone branch June 10, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant