# V1 To V2

  1. Run npm install -g yarn to update the global yarn version to latest v1
  2. Go into your project directory
  3. Run yarn set version berry to enable v2 (cf Install (opens new window) for more details)
  4. If you used .npmrc or .yarnrc, you'll need to turn them into the new format (opens new window) (see also 1 (opens new window), 2 (opens new window))
  5. Add nodeLinker: node-modules (opens new window) in your .yarnrc.yml file
  6. Commit the changes so far (yarn-X.Y.Z.js, .yarnrc.yml, ...)
  7. Run yarn install to migrate the lockfile
  8. Take a look at this article (opens new window) to see what should be gitignored
  9. Commit everything remaining

source (opens new window)