What is Yarn?
yarn vs npm
Yarn supposed to be faster, more secure and reliable.
NOTE: Why I use yarn? I was following VuePress documentation and it seems to prefer yarn, so I decide to give it a try. BTW, I am no expert or avid user of npm/yarn.
Can yarn and npm co-exist on same machine?
Yes, they seems to be independent (at the same time compatible) of each other. I don’t see any conflict so far.
NOTE: I didn’t try mixing yarn and npm in the same project.
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt-get update && sudo apt-get install yarn
npm install -g yarn
Check yarn version
Yarn install packages
yarn global add vuepres # OR npm install -g vuepress
yarn add -D vuepress # OR npm install -D vuepress