Home > Net >  Revert from pnpm to npm
Revert from pnpm to npm

Time:05-19

I just realized I won't be able to use pnpm in a project, due to compatibility issues with other tools. Is there a way to cleanly switch back to npm, which is my default package manager? What would be your approach? I'm trying to avoid reverting back to a previous push.

Thank you!

CodePudding user response:

This should be pretty easy:

  • Delete node_modules
  • Delete pnpm_lock.yaml (this will be replaced by package-lock.json)
  • Replace all pnpm calls to npm in package.json

Now you can run npm install. Tadaa, welcome back to npm.

  • Related