np
np copied to clipboard
`npm whoami` fails when `.npmrc` has custom registry
Description
Steps to reproduce
- Add custom registry to
.npmrc - Add
publishConfigwith NPM registryhttps://registry.npmjs.org/ - Run
np
You must be logged in. Use `npm login` and try again.
Expected behavior
https://github.com/sindresorhus/np/blob/04dc20651316ba4697ac998bfe864cf53c776b83/source/prerequisite-tasks.js#L31 should use registry from publishConfig even it's not external registry, otherwise NPM will read .npmrc
Environment
np - 10.2.0 Node.js - 10.2.0 npm - 10.7.0 Git - git version 2.42.0.windows.2 OS - Windows 10