Skip to content

fix: point bin to run.js instead of symlink for npm compatibility#3624

Merged
eablack merged 1 commit intomainfrom
eb/fix-bin-run-for-npm
Mar 27, 2026
Merged

fix: point bin to run.js instead of symlink for npm compatibility#3624
eablack merged 1 commit intomainfrom
eb/fix-bin-run-for-npm

Conversation

@eablack
Copy link
Copy Markdown
Contributor

@eablack eablack commented Mar 27, 2026

Summary

This PR fixes an issue where the heroku command doesn't work for users installing from npm. The problem was that package.json pointed to bin/run, which is a symlink to run.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/run to ./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)

  • fix: Bug fix

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:

  1. Verify the package builds correctly: npm run build
  2. Create a test tarball: npm pack
  3. Extract and inspect the tarball to confirm bin/run.js is present
  4. Install from the tarball and verify the heroku command works
  5. Passing CI suffices for general functionality

Related Issues

#3622

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.
@eablack eablack requested a review from a team as a code owner March 27, 2026 16:06
@eablack eablack temporarily deployed to AcceptanceTests March 27, 2026 16:06 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 27, 2026 16:06 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 27, 2026 16:06 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 27, 2026 16:06 — with GitHub Actions Inactive
Copy link
Copy Markdown
Contributor

@michaelmalave michaelmalave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@eablack eablack merged commit dd3cfa3 into main Mar 27, 2026
18 checks passed
@eablack eablack deleted the eb/fix-bin-run-for-npm branch March 27, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants