npm error E401: Unable to authenticate, need: BASIC realm=“Sonatype Nexus Repository Manager”

我的未来我决定 提交于 2020-06-16 17:29:31

问题


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.


回答1:


I found a way out. With this new npm version they are enforcing authentication to access certain packages. We realised we don't need to use authentication for any of the packages we were downloading, hence the auth code we had was unnecessary. So we just removed it and it all worked.



来源:https://stackoverflow.com/questions/61613797/npm-error-e401-unable-to-authenticate-need-basic-realm-sonatype-nexus-reposi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!