npm login reports error npm ERR! code E403

npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmmirror.com/-/user/org.couchdb.user:jieyucx - [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.

insert image description here

reason
It is your NPM that uses the mirror address.

liberation program

  1. Global installation is the source manager of node
npm install -g nrm
  1. nrm lsView the current source with
nrm ls

insert image description here
3. Switch to the official source address of npm

nrm use npm

insert image description here

Remember to switch back every time npm publish. When installing the package normally, you can
switch to Taobao mirror source by nrm use taobao

Depend on! ! !
I cut it and he reported 401 again. I am really convinced. It is obvious that I have switched to the npm source address.
insert image description here
You can use npm config get registry to view the current source

npm config get registry

If it is the npm source address, we close the terminal, restart it, and try to log in again.

Guess you like

Origin blog.csdn.net/jieyucx/article/details/131900731