fix: point bin to run.js instead of symlink for npm compatibility#3624
Merged
fix: point bin to run.js instead of symlink for npm compatibility#3624
Conversation
Symlinks are not preserved in npm tarballs, causing the heroku command to fail for users installing from npm. This change points the bin entry directly to run.js instead of the run symlink.
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
This PR fixes an issue where the
herokucommand doesn't work for users installing from npm. The problem was thatpackage.jsonpointed tobin/run, which is a symlink torun.js. Since symlinks are not preserved in npm tarballs, the published package was broken for npm users.The fix changes the bin entry from
./bin/runto./bin/run.js, pointing directly to the actual executable file instead of the symlink. This ensures the package works correctly when installed from npm while keeping the symlink in the repo for local development convenience.Type of Change
Patch Updates (patch semver update)
Testing
Notes:
This issue only affects users installing from npm (not from git), and CI wouldn't catch it since CI runs from the git repository where the symlink exists.
Steps:
npm run buildnpm packbin/run.jsis presentherokucommand worksRelated Issues
#3622