If you are using either npm or yarn to install packages, ditch it and start using pnpm. pnpm will save you disk space as well as installation time. You can read about the motivation behind creating pnpm on their website.
If your Node.js version is >16.13, use Corepack to enable pnpm.
|npm command||pnpm equivalent|
Convert npm project to pnpm
Say, you already have a project that consists of
package-lock.json and various other files. Now to convert this project to use pnpm, first delete the
node_modules folder as well as the
package-lock.json file. Do not delete the
Now, instead of doing
npm i, run the command