关于npm login出现403问题报错解决,发布npm包遇到的报错: ERR! 403 Forbidden, Are you logged in as the correct user

npm login时报错

npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmmirror.com/-/user/org.couchdb.user:name - [FORBIDDEN] Public registration is not allowed
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/cuiguoliang/.npm/_logs/2022-09-23T08_25_10_686Z-debug-0.log

网上大多解决方案是将npm使用镜像指向taobao镜像报错原因所以一直困扰没有方向,查看镜像然后为镜像错误只需要执行npm config set registry https://registry.npmjs.org/将镜像切回即可正确完成登录操作

哈哈 成功
关于npm login出现403问题报错解决,发布npm包遇到的报错: ERR! 403 Forbidden, Are you logged in as the correct user_第1张图片

发布npm包遇到的报错: ERR! 403 Forbidden, Are you logged in as the correct user

npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/super-cli - You do not have permission to publish “super-cli”. Are you logged in as the correct user?
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

出现在发布的时候报这个错,说明你在package.json中登记的name已近被采用了。重名了,所以你得换一个。我们在发布一个包之前,最好拿着这个登记的name去搜一下,如果已近有了,那就要换一个。
如果是在删除包的时候报这个错那多半 是npm上压根就没这个包了,或者这个包就不是你当前账号发布的

你可能感兴趣的:(日常报错,npm,前端,javascript)