Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
`npm i` / `npx @iclawapp/iclaw` failed with MODULE_NOT_FOUND: the postinstall hook ran `node scripts/copy-opaque-vendor.mjs`, but `scripts/` is not in the `files` whitelist, so the script isn't in the published tarball — npm tried to run a file that doesn't exist on the user's machine. This broke 0.2.0 (current npm `latest`). The hook was also unnecessary at install time: it only copies the browser vendor bundles (opaque + noble) into public/js/vendor/, which `prepack` already does before publish, and the result ships via the `public` whitelist. The server imports @serenity-kit/opaque from node_modules (a runtime dependency), not from scripts/. So removing postinstall fully fixes install with no loss of behaviour. Verified: packing the tree and installing the tarball into a clean project now succeeds (was MODULE_NOT_FOUND); vendor/opaque + vendor/noble are present in the tarball, bin/iclaw links, @serenity-kit/opaque resolves. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Removing postinstall (prev commit) fixed install but broke CI: `npm ci` no longer copies the browser vendor bundles, and the test job runs `npm test` directly — so remoteAccessVendorAssets / E2eBrowserInterop tests hit missing public/js/vendor/** (those files are gitignored, generated). Make the dependency explicit instead of relying on an install-time side effect: add `prebuild` and `pretest` hooks (and a manual `vendor` script) that run copy-opaque-vendor.mjs. Now every path is self-sufficient: - CI test → pretest generates vendor - CI/local build → prebuild generates vendor - publish → prepack generates vendor (unchanged) - end-user install → nothing runs; vendor already ships in the tarball Verified locally by deleting public/js/vendor/** (mimics a fresh CI checkout): npm test → 366 pass, npm run build → ok, typecheck → ok, and a clean tarball install still succeeds with vendor present. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Changes
Screenshots / GIFs
How to test
Checklist
devnpm run typecheckpassesnpm run buildpassesCHANGELOG.mdunder[Unreleased]if user-visibleROADMAP.mdif a planned item is now done