fix(sea): prevent sentinel duplication when pkg is in dependencies#243
Merged
Conversation
When a user lists @yao-pkg/pkg in `dependencies` (instead of `devDependencies`), the walker includes sea.js in the SEA archive. The verbatim sentinel string ends up in the injected blob, causing postject to find it twice and fail with "Multiple occurences of sentinel found in the binary". Split the sentinel via string concatenation so the literal never appears in compiled output. Closes https://github.com/julianpoemp/yao-pkg-nestjs-sea-example Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a user-invocable skill that guides through build failures, runtime crashes, missing assets, binary bloat, cross-compile regressions, native addons, SEA issues, patches, and dictionaries. Also add a section to the troubleshooting docs with install and usage instructions and a cross-reference from the debug VFS page. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1f61e13 to
bb5f7dc
Compare
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
@yao-pkg/pkgindependencies(instead ofdevDependencies), the walker includessea.jsin the SEA archive. The verbatim sentinel stringNODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2ends up inside the injected blob, causing postject to find it twice and fail with "Multiple occurences of sentinel found in the binary". Fixed by splitting the sentinel via string concatenation so the literal never appears in compiled output./pkg-debugClaude Code skill for interactive troubleshooting — covers build failures, runtime crashes, missing assets, binary bloat, cross-compile, native addons, SEA issues, patches/dictionaries, and contributing fixes back to pkg.Repro: https://github.com/julianpoemp/yao-pkg-nestjs-sea-example
Test plan
test-00-sea,test-85throughtest-92)grep -cshows 0 occurrences of the sentinel literal in compiledlib-es5/sea.jsyarn lintpasses clean🤖 Generated with Claude Code