Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pnpm outdated command fails to detect updates when registry is configured #5492

Closed
jiadesen opened this issue Oct 14, 2022 · 1 comment · Fixed by #5501
Closed

pnpm outdated command fails to detect updates when registry is configured #5492

jiadesen opened this issue Oct 14, 2022 · 1 comment · Fixed by #5501
Assignees

Comments

@jiadesen
Copy link

pnpm version

7.13.4

Code to reproduce the issue:

NA

Expected behavior:

expected

Actual behavior:

actual

Additional information:

  • node -v prints: v16.16.0
  • Windows, macOS, or Linux?: macOS
@zkochan zkochan self-assigned this Oct 15, 2022
@zkochan
Copy link
Member

zkochan commented Oct 15, 2022

A workaround is to set the registry to:

registry=https://registry.npmmirror.com

The issue is that the code exits here:

// It might be not the best solution to check for pkgSnapshot.name
// TODO: add some other field to distinct packages not from the registry
if (pkgSnapshot.resolution && (pkgSnapshot.resolution['type'] || pkgSnapshot.name)) {
if (current !== wanted) {
outdated.push({
alias,
belongsTo: depType,
current,
latestManifest: undefined,
packageName,
wanted,
})
}
return
}

and that happens because the domain of the configured registry differs from the domain that hosts the tarball. Even though https://registry.npm.taobao.org just redirects to https://registry.npmmirror.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants