Cannot login into Verdaccio

2.1k Views Asked by At

I have just installed Verdaccio on my computer. I have changed nothing in the config file, apart from adding proxy_related info:

http_proxy: http://proxy.ip:8080
https_proxy: https://proxy.ip:8080
no_proxy: localhost,127.0.0.1

After starting the process, I have tried to login to the registry from the library project workspace

npm adduser --registry http://localhost:4873

But I get this error:

npm ERR! 503 Service Unavailable - POST http://localhost:4873/-/v1/login

If I try to reach http://localhost:4873/ from my browser, I can see the Verdaccio webpage.

What am I doing wrong?

2

There are 2 best solutions below

0
On

I don't know what kind of environment you are trying this (work, home, etc.) but, for me, my problem was that behind a corporate firewall I have to configure the NPM proxy (http and https), so adding the localhost as an exception to noproxy config attribute of NPM, it worked for me.

npm config set noproxy localhost

Try to change yours, from no_proxy to noproxy, maybe it is simple as that.

0
On

update your npm to the last version

npm install -g npm