Skip to content

[BUG] v7.3.0 publish --dry-run will require login, and publishConfig from package.json load after the check (ENEEDAUTH) #2411

@dr-js

Description

@dr-js

Current Behavior:

publish --dry-run with v7.3.0 will require login (ENEEDAUTH)

Expected Behavior:

publish --dry-run should work when not login, like in CI env.

Steps To Reproduce:

mkdir ./test-publish-dry-run/
cd ./test-publish-dry-run/
npm init --yes
npx --yes npm@6 publish --dry-run # will pass
npx --yes [email protected] publish --dry-run # will error

Sample error log:

# npm publish --dry-run
npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in.
npm ERR! need auth You need to authorize this machine using `npm adduser`

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-12-24T16_00_58_505Z-debug.log

Environment:

  • OS: Ubuntu 18.04
  • Node: 14.15.3
  • npm: 7.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions