Skip to content

Incorrect "No package versions were returned" warning for non-latest --target when no upgrade is available #1764

@duniul

Description

@duniul

Steps to Reproduce

Dependencies:

{
  "dependencies": {
    "ncu-test-v2": "2.0.0"
  }
}

ncu-test-v2@2.0.0 is the latest published version, so no minor upgrade is available.

Steps:

  1. Run ncu --target minor (also happens with other non-latest targets).

Current Behavior

No package versions were returned. This may be a problem with your installed npm, the npm registry, or your Internet connection. Make sure npx pacote packument ncu-test-v2 is working before reporting an issue.

The message is confusing/incorrect as the registry is available and the package was checked successfully, there just isn't an upgrade available at the --target level.

With --target latest it correctly prints All dependencies match the latest package versions :) for the exact same project.

Expected Behavior

All dependencies match the minor package versions :)

Environment

  • node: v24.13.0
  • npm-check-updates: 22.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions