npm error E401: Unable to authenticate, need: BASIC realm="Sonatype Nexus Repository Manager"
Full error message
I upgraded node version to 12.16.2 and npm version to 6.14.4. After that I am not able to run npm install, as I'm getting this error code E401 npm ERR! Unable to authenticate, need: BASIC realm="Sonatype Nexus Repository Manager" I even tried deleting node_modules and package-lock.json and running npm install again, but doesn't change anything.
Solutionsource: stackoverflow \u2197
I had similar issue. I resolved it by adding _auth into my ~/.npmrc. See the doc how to encode your nexus credential. 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.
API access
Get this solution programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/error/4c7c3cb61ad24682c74ac2c1dc3500f11837ad3e7704a9da89942f8c15c4f67ahash \u00b7 4c7c3cb61ad24682c74ac2c1dc3500f11837ad3e7704a9da89942f8c15c4f67a