chore: pin napi-rs/emnapi versions to prevent WASM runtime mismatch#8982
Draft
chore: pin napi-rs/emnapi versions to prevent WASM runtime mismatch#8982
Conversation
✅ Deploy Preview for rolldown-rs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Brooooooklyn
requested changes
Apr 1, 2026
Member
Brooooooklyn
left a comment
There was a problem hiding this comment.
Instead of using pinned versions, you should run pnpm dedupe --check in Rolldown CI to avoid any duplication of packages.
See https://github.com/voidzero-dev/vite-plus/blob/main/.github/workflows/ci.yml#L181
Member
|
I think |
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
@emnapi/coreand@emnapi/runtimeas explicit deps of@rolldown/browser(required peer deps of@napi-rs/wasm-runtime)^) for@emnapi/core,@emnapi/runtime,@napi-rs/cli, and@napi-rs/wasm-runtimein the pnpm catalogknip.jsoncto suppress false-positive unused dependency warningsWhy
The prebuilt WASM addon is compiled against a specific emnapi version by
@napi-rs/cli. If users install@rolldown/browserand semver ranges resolve@emnapi/core/@emnapi/runtimeto a newer release, the JS runtime won't match the compiled WASM binary — causing errors likeCannot read properties of undefined (reading 'whenLoaded').See: toyobayashi/emnapi#202
Pinning exact versions ensures the published package always pulls the emnapi version matching the compiled WASM binary, and forces conscious updates when upgrading
@napi-rs/cli.closes #8974, #8978