简体   繁体   中英

difference between yarn registry and npm registry

Yarn install generates a yarn.lock file which fetches packages from npmjs .

  1. How is npmjs different from yarnpkg ?
  2. How do I configure yarn to fetch from yarnpkg ?
  3. Between npmjs and yarnpkg which one is preferred?

As far as the registries go, there is essentially no difference. According to one of the Yarn devs , they just maintain a server that redirects to NPM's registry so that they can monitor traffic and attempt to speed things up. And if you want to change a registry, you can do so on a per-project basis by editing the "registry" key in your .npmrc or globally with npm config set registry to use whatever endpoint you want to download from. For yarn you can use yarn config set registry <registry-url> with an optional global flag .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM