[Bug?]: `yarn upgrade-interactive` silently ignores errors when checking package versions

Open Beginner friendly
#7,289 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@juho-jaakkola is already working on this.

Since Sep 29, 2026.

  • #7290 by @juho-jaakkola — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
nodejs, typescript
Domain
cli, devtools

Research direction

Start in packages/plugin-interactive-tools/sources/commands/upgrade-interactive.tsx, especially the two fetchUpdatedDescriptor calls that catch errors and the later filter that drops packages without suggestions. Trace how registry failures can be reported without hiding other packages' results. Done when a failed version check is distinguishable from no available upgrade; the issue does not name a test, so locate and run relevant upgrade-interactive tests.

Written by the indexing model from the issue text.

Description

bug
Self-service
  • I'd be willing to implement a fix
Describe the bug

yarn upgrade-interactive silently ignores errors encountered while querying a registry for available package versions.

For example, when a dependency is hosted on a private npm registry and the registry responds with 403 Forbidden, yarn install correctly reports the error, but yarn upgrade-interactive silently behaves as if there were no upgrade available.

This makes it impossible to distinguish between:

  • the package having no available upgrade, and
  • Yarn being unable to determine whether an upgrade is available.
To reproduce
  1. Configure a dependency to use a private npm registry.
  2. Make the registry return 403 Forbidden when Yarn queries package metadata (for example, due to missing/invalid credentials).
  3. Run:
    yarn install
    
    Yarn reports the registry error, e.g. 403 Forbidden.
  4. Run:
    yarn upgrade-interactive
    
    The package is silently omitted from the list of upgrade candidates. No error or warning is displayed.

Expected behavior

yarn upgrade-interactive should indicate that it was unable to check the package.

It doesn't necessarily need to abort the entire interactive command — other packages could still be displayed — but a registry error should not be indistinguishable from "no update is available."

For example, it could display a warning such as:

Warning: failed to check @example/private-package for updates: HTTP 403 Forbidden

or otherwise mark the package as unavailable to check.

Actual behavior

The registry error is silently discarded and the package is omitted from the upgrade suggestions.

Environment
System:
    OS: Linux 7.0 Ubuntu 24.04.4 LTS 24.04.4 LTS (Noble Numbat)
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
  Binaries:
    Node: 20.20.1 - /tmp/xfs-b142f623/node
    Yarn: 4.12.0 - /tmp/xfs-b142f623/yarn
    npm: 10.8.2 - /home/juho/.nvm/versions/node/v20.20.1/bin/npm
Additional context

The result of running yarn install displays errors:

Image

But yarn upgrade-interactive does not:

Image

The current implementation contains:

const [resolution, latest] = await Promise.all([
  fetchUpdatedDescriptor(descriptor, descriptor.range, referenceRange).catch(() => null),
  fetchUpdatedDescriptor(descriptor, descriptor.range, `latest`).catch(() => null),
]);

The catch(() => null) means that registry errors are converted to null.

Later, packages with no non-empty suggestions are removed:

if (suggestions.filter(suggestion => suggestion.label !== ``).length <= 1)
  return null;

Therefore, an HTTP error becomes indistinguishable from a package for which no upgrade is available.

Source:

https://github.com/yarnpkg/berry/blob/e4e423a1eb117b5129f20ac626a03eb7a97aedff/packages/plugin-interactive-tools/sources/commands/upgrade-interactive.tsx

Dominant language
TypeScript
Stars
8.1k
Forks
1.4k
Avg merge
2d 1h
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from yarnpkg/berry

All issues in yarnpkg/berry

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.