How do you deal with node_modules?

Madza - Jul 24 '20 - - Dev Community

Node has been around for more than a decade. Developing on it has been fun, tho one of the main drawbacks has always been it's spacious package management.

In 2020, create-react-app would create over 30k files, close to 200 MB in total. Even without installing it via boilerplate, depending on the selected dependencies, the local node_modules folder can get pretty heavy quickly.

So, what if you have like hundreds of projects?

Do you keep the node_modules folder for archived (completed) projects or do you delete it and do npm install if you need to re-visit the particular project later to save space?

Or have you already switched to Ryan's newest offering - Deno, that imports and uses dependencies directly from URLs?

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .