Skip to content

Bug: kdm Command Not Found After Global Installation #19

@utkarsh232005

Description

@utkarsh232005

Summary

After installing kdm-cli globally via npm, the package installs successfully but the kdm command is not available in the terminal.

The installation completes without errors, however executing the CLI results in:

Command 'kdm' not found

Steps to Reproduce

1. Install the package globally

npm install -g kdm-cli@latest

2. Run the CLI command

kdm

Expected Behavior

The CLI should be accessible globally and execute successfully:

kdm

Actual Behavior

Command 'kdm' not found

Environment

Component Version
OS Ubuntu Linux
Node.js v24.15.0
npm 11.2.1
Package kdm-cli@1.2.0

Additional Information

The package appears in the global npm package list:

npm list -g --depth=0

Output:

kdm-cli@1.2.0

This indicates the package installs correctly, but no executable binary is being linked globally.


Possible Cause

The package may be missing a valid bin configuration in package.json.

Example:

"bin": {
  "kdm": "./bin/cli.js"
}

Additionally, the CLI entry file should begin with:

#!/usr/bin/env node

Suggested Fix

  • Add a proper bin field in package.json
  • Ensure the CLI entry file path is correct
  • Ensure the CLI file is executable
  • Republish the package after updating the configuration

Installation Logs

npm install -g kdm-cli@latest
changed 267 packages in 12s

Then:

kdm

Result:

Command 'kdm' not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    BeginnerSkill typebugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions