Skip to content

Conversation

@christian-byrne
Copy link
Contributor

Problem

When npm is missing but Node.js is present, the current error message just says "npm usually comes with Node.js. Try reinstalling Node.js" — not enough detail for non-technical users.

Solution

Added _print_npm_not_found_help() that provides detailed, OS-specific step-by-step instructions:

  • Windows: Uninstall via Add/Remove Programs, reinstall from nodejs.org with default options
  • macOS: Direct download or Homebrew option
  • Linux: apt install npm or NodeSource repository setup

Each guide includes:

  • Numbered steps anyone can follow
  • Reminder to restart terminal after installation
  • Verification command to confirm the fix worked

Testing

All existing tests pass (pytest tests/comfy_cli/command/test_frontend_pr.py).

When npm is missing but Node.js is present, users now see detailed,
step-by-step instructions tailored to their operating system:

- Windows: Uninstall/reinstall steps via Add/Remove Programs
- macOS: Direct download or Homebrew options
- Linux: apt install npm or NodeSource repository setup

Each guide includes verification steps so non-technical users can
confirm the fix worked before re-running their command.
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Jan 20, 2026
Copy link
Contributor

@bigcat88 bigcat88 left a comment

Choose a reason for hiding this comment

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

Failure in CI is not related to PR

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 20, 2026
@christian-byrne christian-byrne merged commit 88dba42 into main Jan 20, 2026
12 of 14 checks passed
@christian-byrne christian-byrne deleted the improve-npm-error-messages branch January 20, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants