使用npm安装其他东西时,
例:npm install -g cluster
安装失败且提示:code E401
Unable to authenticate, need: BASIC realm="Sonatype Nexus Repository Manager"
这时需要执行:npm config set registry https://registry.npmjs.org/
然后再install即可正常安装
博客介绍了使用npm安装时遇到的问题及解决办法。当使用npm install -g安装失败,提示code E401时,可执行npm config set registry https://registry.npmjs.org/,之后再进行install操作就能正常安装。
使用npm安装其他东西时,
例:npm install -g cluster
安装失败且提示:code E401
Unable to authenticate, need: BASIC realm="Sonatype Nexus Repository Manager"
这时需要执行:npm config set registry https://registry.npmjs.org/
然后再install即可正常安装

被折叠的 条评论
为什么被折叠?