Skip to content

npm outdated suddenly throws a multitude of "Access token expired or revoked. Please try logging in again." noticesΒ #8816

@soulchild

Description

@soulchild

Starting yesterday evening, npm outdated started throwing lots of Access token expired or revoked. Please try logging in again. notices. This seems to happen for every local package in my npm workspaces TurboRepo. Apparently the outdated command tries to find newer versions for local packages as well:

$ npm outdated --verbose 

npm http fetch GET 404 https://registry.npmjs.org/@localnamespace%2ftypescript-config 841ms (cache skip)
npm notice Access token expired or revoked. Please try logging in again.

Googling this error message gave me literally zero results, so I dug deeper into the npm source code and found out that the message is returned from the registry.npmjs.org server itself as a response header and then logged as a notice:

$ curl -v https://registry.npmjs.org/@localnamespace2ftypescript-config
< npm-notice: Access token expired or revoked. Please try logging in again.

I suspect there has been a change yesterday on the npm registry servers which now adds this npm-notice header to every 404 returned by the npm registry. But it makes me wonder: Why does the outdated command check the registry for local packages in the first place? And does it really make sense to return this error when a package was just not found?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions