fix(wallet): build the local SDK before bundling so a fresh clone works#77
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the
npm run buildfailure on a fresh clone:Cause: the wallet depends on
lightnode-sdkviafile:../sdk, butsdk/distis a gitignored build artifact and npm only has the stale0.10.8(local is0.18.3). A fresh clone had nodistto resolve. It only worked in environments wheresdk/distwas already built.Fix: mirror the root app's
prebuildpattern - aprebuild/predevstep that installs + builds the local SDK first, sonpm run buildproducessdk/distbefore WXT bundles. Verified by deletingsdk/distand running a cleannpm run buildend 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.