npm and use yarn
They all belong js package management tools, you can install the package or module
yarn is launched facebook, google jointly developed by the
the difference:
npm npm download package, then the install example, which is in accordance with the ordering of packets, i.e. the queue one by one download, a download is complete, then download another
yarn is to download package downloaded, parallel download speed. Offline mode: If a package before between already installed, install again with Yarn retrieved from the cache, you do not like to download from the network as a npm.
yarn have always lock file, function and npm of package.lock.json almost.
After npm version 5.0, will bring their own package.lock.json files when you delete node_modules, the document describes your project package is installed which version you then npm install, then installs the specified version package.
Different commands
npm install == yarn
npm isntall vue == yarn add vue
npm uninstall vue == yarn remove vue
npm update == yarn upgrade