How to set a project's package.json to be able to install from local registry with verdaccio How to set a project's package.json to be able to install from local registry with verdaccio kubernetes kubernetes

How to set a project's package.json to be able to install from local registry with verdaccio


Thanks everyone for helping me, I solved this problem by reconfiguring my Dockerfile on auth service by adding line:

RUN npm config set registry http://<the_local_registry_container_IP>:4873

I am successful building the container but it raised new issues "request has been deprecated, see github.com/request/request/issues/3142" cause of I am using supertest. I don't know why I am still searching for the main problem. In another occasion if I build it with public npm repo, it doesn't raise that problem.


You need to associate the scope with your registry:

npm login --registry=http://localhost:4873 --scope=@mycompany

You can find the documenation here

After this npm install install package from you repository if the package is in the scope @mycompany