Skip to content

Instantly share code, notes, and snippets.

@vi4hu
Last active April 20, 2023 07:18
Show Gist options
  • Save vi4hu/a54c8d7601773558a0fb2de9f388fa79 to your computer and use it in GitHub Desktop.
Save vi4hu/a54c8d7601773558a0fb2de9f388fa79 to your computer and use it in GitHub Desktop.
Migrate from npm to yarn

Migrating your node project from using npm to yarn

  1. Install yarn with npm globally
npm i -g yarn
  1. Run yarn in project's root dir

It will create a yarn.lock file, be patient.

yarn
  1. Change any npm related cmd in package.json to yarn's equivalent

  2. Do not forget to remove package-lock.json

rm package-lock.json

Now you can use yarn :>

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