fix(node): remove unpublished NAPI targets from package manifest#348
Merged
DorianZheng merged 1 commit intoboxlite-ai:mainfrom Mar 6, 2026
Merged
Conversation
The napi.targets list included x86_64-apple-darwin and aarch64-unknown-linux-gnu, but CI only builds darwin-arm64 and linux-x64-gnu. napi prepublish generates optionalDependencies for all declared targets, so the published @boxlite-ai/[email protected] package references two platform packages that were never published to npm: - @boxlite-ai/boxlite-darwin-x64 (404) - @boxlite-ai/boxlite-linux-arm64-gnu (404) This breaks npm ci in cross-platform builds (e.g. Docker) because npm cannot create a complete lockfile when optional dependencies don't exist on the registry. Remove the two targets that aren't built by CI. They can be re-added when the corresponding platforms are supported and built. Made-with: Cursor
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.
Problem
(fixes #347)
@boxlite-ai/[email protected]on npm declares fouroptionalDependencies(generated bynapi prepublishfromnapi.targets):@boxlite-ai/boxlite-darwin-arm64— published ✅@boxlite-ai/boxlite-darwin-x64— 404 ❌@boxlite-ai/boxlite-linux-x64-gnu— published ✅@boxlite-ai/boxlite-linux-arm64-gnu— 404 ❌Root cause
sdks/node/package.jsondeclares 4 NAPI targets, but.github/workflows/config.ymlonly builds 2 platforms (darwin-arm64andlinux-x64-gnu). Thenapi prepublishstep inprepackinjectsoptionalDependenciesfor all 4 targets regardless of which platform packages are actually built and published.Fix
Remove
x86_64-apple-darwinandaarch64-unknown-linux-gnufromnapi.targetssince they aren't built by CI. They can be re-added when the corresponding platforms are supported and built:x86_64-apple-darwin(macOS Intel) — listed as "Coming soon" in the READMEaarch64-unknown-linux-gnu(Linux ARM64) — listed as "Supported" but not built in CI yetThis ensures the published package only declares optional dependencies that actually exist on npm.
I also suppose another solution could to build it in the CI tho.