3

Boiler plate project created with create react app is 200MB+, with out us having wrote any code.

Most of the 200MB+ files is in the node_modules folder ( from all the lib it's downloaded). I can prevent re-download by installing most of the modules globally, but the modules still gets copied to the node_modules folder of the active project.

Is there a way to reduce the disk space size of my projects, ie. to have my active project reference the npm global libs directly as opposed to create a copy of the files in the node_modules folder.

What I've found so far:

  • 'ejecting' create react app to customized: I didn't like dealing with the mess of dealing with and having to maintain my own ejected version of create react app.
  • ways to prevent download: share node.js modules across React apps? (install the lib globally)
JackDev
  • 11,003
  • 12
  • 51
  • 68
  • 1
    suggest you delete node_modules for the previous projects, and once you need it to work with it again run npm install – Nemer Aug 12 '19 at 01:14
  • Take a look at this package: [npkill](https://www.npmjs.com/package/npkill) – Arjun Sep 15 '22 at 06:00

0 Answers0