Switching the package manager from yarn to npm

Posted . Visible to the public.

We recently migrated a Rails application from yarn to npm. We decided to go this step instead of upgrading to > Yarn 2.0 to reduce the number of dependencies in our project.

Migration

  • Remove the yarn.lock file
  • Remove the node_modules folder
  • Run npm install
  • Replace all occurrences of yarn with npm in your project

Notes

Katrin
Last edit
Henning Koch
License
Source code in this card is licensed under the MIT License.
Posted by Katrin to makandra dev (2024-11-20 13:58)