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

fix: "unpublished by undefined" caused by tightened privacy policies. #3834

Closed
wants to merge 1 commit into from

Conversation

anurbol
Copy link

@anurbol anurbol commented Oct 5, 2021

Now npm cli shows messages like this for unpublished projects when running npm view (note Unpublished by undefined):

> npm view my-package
npm ERR! code E404
npm ERR! 404 Unpublished by undefined on 2021-10-05T10:00:00.000Z
npm ERR! 404 
npm ERR! 404  'my-package' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)

This simple fix just removes the by undefined part.

@anurbol anurbol requested a review from a team as a code owner October 5, 2021 11:12
@anurbol anurbol changed the title Fix "unpublished by undefined" caused by tightened privacy policies. fix: "unpublished by undefined" caused by tightened privacy policies. Oct 5, 2021
@wraithgar wraithgar changed the base branch from latest to release-next October 5, 2021 13:45
@wraithgar
Copy link
Member

The npm registry isn't the only registry the cli talks to, can this be something that shows the name if it exists? Also we'll need tests.

@wraithgar
Copy link
Member

We'll likely need to change the "bug the author" copy cause that now makes no sense if there is no author listed.

@wraithgar wraithgar self-assigned this Oct 5, 2021
@darcyclarke darcyclarke added semver:patch semver patch level for changes Release 8.x work is associated with a specific npm 8 release labels Oct 5, 2021
@isaacs
Copy link
Contributor

isaacs commented Oct 5, 2021

The "bug the author to publish it" copy is a relic from a time when lots of well-known JavaScript modules were "published" on github or someone's website, but not in the npm registry. So you'd have users that knew of a package, but that package wasn't in the registry, simply because no one had ever asked the author to publish it to npm.

These days, publishing to npm is a pretty normal thing for module authors to do, so if something isn't published, it's more likely you just spelled it wrong or you're looking in the wrong registry.

@radiantspace radiantspace removed their request for review October 20, 2021 13:38
@wraithgar wraithgar changed the base branch from release-next to latest March 9, 2022 18:25
@ruyadorno ruyadorno added the pr: needs tests requires tests before merging label Mar 9, 2022
@wraithgar
Copy link
Member

#4572

@wraithgar wraithgar closed this Mar 16, 2022
@wraithgar wraithgar deleted the unpublished-by-undefined branch March 16, 2022 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: needs tests requires tests before merging Release 8.x work is associated with a specific npm 8 release semver:patch semver patch level for changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants