The project should have yarn installed.
under the directory of your project:
npm install -g yarn
you can get the latest version like 1.22.17
2. yarn set version berry
this will enable the version 2+
But! When I check after this, my yarn version didn’t change. berry doesn’t work,orz
so I use yarn set version 3.1.0
And the version changed.
And also I tried yarn set version latest
3.rm -fr node_modules
remove modules to set to v3 project
4. run yarn
there is a cache file.
And yarn v3 creates a file .yarnrc.yml includes the yarn path inside.
the NodeLinker will appear in the yarnrc.yml file
5.yarn add .
yarn commit -m “yarn upgrade to v3”
Commit the changes
6. run yarn install
to migrate the lockfile
More info check:
👉Follow me for more useful web development content! love sharing🥰