chore: pin @emnapi/* as optional deps to fix npm ci#7
Merged
kevinccbsg merged 1 commit intomainfrom Apr 29, 2026
Merged
Conversation
Workaround for the npm optional-deps lockfile bug triggered by @tailwindcss/oxide-wasm32-wasi and @rolldown/binding-wasm32-wasi (both pull in @napi-rs/wasm-runtime which peer-depends on @emnapi/*). Without this, npm ci fails on platform switches (Linux <-> macOS, arm64 <-> x64) because the lockfile drops the WASM-fallback peer entries depending on which platform generated it. Refs: npm/cli#4828 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
88a60de to
1797668
Compare
TWD Contract Validation
6 passed · 0 failed · 1 warnings |
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
Adds
@emnapi/coreand@emnapi/runtimeasoptionalDependenciesto work around the npm lockfile-sync bug triggered by Tailwind 4 + Vite 8 (rolldown).Why
Two transitive paths in this app pull in
@napi-rs/wasm-runtime, which peer-depends on@emnapi/*:npm has a long-standing bug where the lockfile, depending on which platform generated it, omits some of those optional entries.
npm cithen fails on a different platform with:Pinning them at the root forces the lockfile to always carry them.
Refs: npm/cli#4828, tailwindlabs/tailwindcss#13654
Test plan
npm cisucceeds locally on macOS🤖 Generated with Claude Code