How to config several private repository and public repository in npm?

后端 未结 1 973
面向向阳花
面向向阳花 2021-01-15 21:26

I want to run NPM install and to have multi repositories to get dependencies. The logic that I want first to look on public nexus and just if it didn\'t find the artifcat lo

1条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-15 21:39

    One way to accomplish this is to setup a private NPM proxy registry such as Verdaccio. You can configure your .npmrc to use your Verdaccio registry instead of npmjs.org and when you npm install or yarn add a module your private registry will be searched first, if the module isn't in your private registry it will then look in a configured upstream or "uplink" registry. You can configure multiple uplink registries as shown here: http://www.verdaccio.org/docs/en/uplinks.html

    0 讨论(0)
提交回复
热议问题