Yarn Command Cheat Sheet
Yarn Command Cheat Sheet
Installation
yarn install
Install all the dependencies listed in package.json.
yarn installyarn add [package]
Install a new package and add it to dependencies in package.json.
yarn add lodashyarn add [package] –dev
Install a development environment package and add it to devDependencies in package.json.
yarn add webpack --devUpdate
yarn upgrade [package]
Upgrade an installed package to its latest version.
yarn upgrade lodashyarn upgrade [package]@[version]
Upgrade an installed package to a specific version.
yarn upgrade lodash@4.17.21Removal
yarn remove [package]
Remove a package from the project and delete the corresponding record from package.json.
yarn remove lodashOthers
yarn cache clean
Clear Yarn’s cache.
yarn cache cleanyarn global add [package]
Install a global package.
yarn global add create-react-app