Skip to content

Instantly share code, notes, and snippets.

@agnelnieves
Created May 14, 2019 03:46
Show Gist options
  • Save agnelnieves/6e3dbd12d0ec8e6150841851f99518b0 to your computer and use it in GitHub Desktop.
Save agnelnieves/6e3dbd12d0ec8e6150841851f99518b0 to your computer and use it in GitHub Desktop.
Simple cheatsheet of equivalent NPM & Yarn CLI commands

CLI Commands Cheatsheet NPM to Yarn

Simple cheatsheet of equivalent NPM & Yarn CLI commands

NPM Yarn
npm install yarn install
npm install --no-package-lock yarn install --no-lockfile
npm install [package] --save yarn add [package]
npm install [package] --save-dev yarn add [package] --dev
npm install [package] --save-optional yarn add [package] --optional
npm install [package] --save-exact yarn add [package] --exact
npm install [package] --global yarn global add [package]
npm update --global yarn global upgrade
npm rebuild yarn add --force
npm uninstall [package] yarn remove [package]
npm cache clean yarn cache clean [package]
rm -rf node_modules && npm install yarn upgrade
npm version major yarn version --major
npm version minor yarn version --minor
npm version patch yarn version --patch
@rd-bretta
Copy link

--frozen-lockfile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment