Skip to content

fix: remove unused bin entries from rebalancer and relayer packages#8264

Closed
paulbalaji wants to merge 1 commit intomainfrom
pb/remove-unused-bin-entries
Closed

fix: remove unused bin entries from rebalancer and relayer packages#8264
paulbalaji wants to merge 1 commit intomainfrom
pb/remove-unused-bin-entries

Conversation

@paulbalaji
Copy link
Collaborator

@paulbalaji paulbalaji commented Mar 3, 2026

Summary

  • Removed unused bin fields from @hyperlane-xyz/rebalancer and @hyperlane-xyz/relayer package.json files

Investigation

These bin entries were causing pnpm warnings on every fresh install in CI:

WARN Failed to create bin at .../node_modules/.bin/hyperlane-rebalancer.
     ENOENT: no such file or directory, open '.../typescript/rebalancer/dist/service.js'
WARN Failed to create bin at .../node_modules/.bin/hyperlane-relayer.
     ENOENT: no such file or directory, open '.../typescript/relayer/dist/fs/service.js'

Root cause: The bin fields were cargo-culted from the CLI package when rebalancer (#7544) and relayer (#7671) were extracted into standalone packages. Unlike the CLI (which is a user-installed command-line tool), these are services — they run via node dist/service.js or Docker CMD ["node", "bundle/index.js"], never via npx or global install.

Why pnpm warns: During pnpm install, pnpm tries to create symlinks in node_modules/.bin/ of every dependent package (cli, infra, rebalancer-sim). The targets (dist/service.js, dist/fs/service.js) don't exist pre-build, so every symlink creation fails with ENOENT.

Why removal is safe:

  • Neither Dockerfile uses the bin entries — Dockerfile.node-service uses CMD ["node", "bundle/index.js"], root Dockerfile has no CMD
  • No CI scripts, tests, or build steps invoke hyperlane-rebalancer or hyperlane-relayer as commands
  • The names appear elsewhere only as Docker image names, Helm release prefixes, and keyfunder role identifiers — none depend on the bin field
  • The only remaining bin in the monorepo is typescript/cli ("hyperlane": "./bundle/index.js"), which is correct

Test plan

  • CI passes (pnpm install no longer warns about missing bin targets)

🤖 Generated with Claude Code


Note

Cursor Bugbot is generating a summary for commit 44e4edb. Configure here.

These bin fields were cargo-culted from the CLI package when rebalancer
and relayer were extracted into standalone packages. Unlike the CLI,
these are services (not CLI tools) and are never invoked via npx or
global install — they run via node dist/service.js or Docker CMD.

The dangling bin entries cause pnpm to warn on every fresh install
because the dist/ targets don't exist pre-build, producing noise like:

  WARN Failed to create bin at .../node_modules/.bin/hyperlane-rebalancer.
  ENOENT: no such file or directory, open '.../dist/service.js'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant