-
Notifications
You must be signed in to change notification settings - Fork 304
Published npm package has duplicate option registration causing crash #64
Copy link
Copy link
Closed
Description
Bug
The published npm package (@open-gitagent/gitagent) crashes immediately on any command due to duplicate requiredOption calls in the compiled dist/ files.
Error
Error: Cannot add option '-f, --format <format>' to command 'export' due to conflicting flag '--format'
- already used by option '-f, --format <format>'
After patching that, a second crash occurs:
Error: Cannot add option '--from <format>' to command 'import' due to conflicting flag '--from'
- already used by option '--from <format>'
Affected files (in published dist)
dist/commands/export.js— line 9-10 both call.requiredOption('-f, --format <format>', ...)dist/commands/import.js— line 453-454 both call.requiredOption('--from <format>', ...)
Source is already fixed
The TypeScript source on main has the correct single calls. The issue is that the latest npm publish was done before this fix, so the compiled output still has the duplicates.
Resolution
A new npm release should resolve this.
Environment
@open-gitagent/gitagentinstalled vianpm i -g @open-gitagent/gitagent- Node.js v25.8.2
- macOS
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels