Skip to content

running npm publish from package.json scripts gives 401 Unauthorized #966

@sayjeyhi

Description

@sayjeyhi

If I run npm publish in cli directly package will publish without any error but when I add it in a script inside package.json file it says :

npm ERR! 401 Unauthorized - PUT https://registry.yarnpkg.com/@someWhere/package - You must be logged in to publish packages.

I tried to delete .npmrc , relogin, generate authToken and add it on npmrc but could not solve it

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