Skip to content

fix: include all bin JS files in npm package#77

Merged
bokelley merged 2 commits into
mainfrom
bokelley/fix-cli-missing-file
Oct 24, 2025
Merged

fix: include all bin JS files in npm package#77
bokelley merged 2 commits into
mainfrom
bokelley/fix-cli-missing-file

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Problem

The CLI tool published in v2.4.0 is broken:

$ npx @adcp/client
Error: Cannot find module './adcp-async-handler.js'

Root Cause

The package.json files field only included bin/adcp.js but the CLI requires bin/adcp-async-handler.js which wasn't being published.

Solution

Changed the files field from:

"bin/adcp.js"

To:

"bin/**/*.js"

This ensures all JavaScript files in the bin directory are included in the published package.

Testing

Verified with npm pack --dry-run:

npm notice 7.5kB bin/adcp-async-handler.js
npm notice 11.5kB bin/adcp.js

Both files are now included.

Impact

  • Fixes the broken CLI in v2.4.0
  • Will publish as v2.4.1 (patch)
  • No API changes, just packaging fix

The CLI tool requires bin/adcp-async-handler.js but it wasn't being
included in the published package, causing 'Cannot find module' errors.

Changed package.json files field from 'bin/adcp.js' to 'bin/**/*.js'
to include all JavaScript files in the bin directory.

Fixes error: Error: Cannot find module './adcp-async-handler.js'
@bokelley bokelley merged commit 9f18fa1 into main Oct 24, 2025
7 checks passed
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.

1 participant