npmyarnpkg

Difference between npm and yarn


Can you explain me what is the difference between:


Solution

  • Yarn is, like NPM, a package manager for Node.JS. Yarn is built by Facebook. It's faster and has more features than NPM. Their main selling points are:

    Security With yarn.lock file (similar to NPM's npm-shrinkwrap.json) all dependencies are locked on the exact version. So, you don't have that “But it works on my machine” struggles anymore. Everyone has the same versions locked in yarn.lock file Speed Yarn uses (fast) proxies and (offline) caching to deliver your modules faster. It also has a LICENSE checker, which checks the license of all your dependency modules.

    However, Yarn is still in it's early days and under development.