I had similar issue. I resolved it by adding `_auth` into my `~/.npmrc`. See the [doc how to encode your nexus credential][1]. I added the encoded credential using `npm config set _auth xxx`.
You wont be able to see the value using `npm config list` or `npm config get _auth`.
[1]: https://help.sonatype.com/repomanager2/node-packaged-modules-and-npm-registries#NodePackagedModulesandnpmRegistries-EncodingCredentialsonLinux
I had similar issue. I resolved it by adding `_auth` into my `~/.npmrc`. See the [doc how to encode your nexus credential][1]. I added the encoded credential using `npm config set _auth xxx`.
You wont be able to see the value using `npm config list` or `npm config get _auth`.
[1]: https://help.sonatype.com/repomanager2/node-packaged-modules-and-npm-registries#NodePackagedModulesandnpmRegistries-EncodingCredentialsonLinux