DEV Community

Aaron009
Aaron009

Posted on

Why does running `npx create-react-app my-app` result in my-app folder consuming 7GB of disk space?

I'm running "npx create-react-app my-app" to create a new React app. However, I noticed that the "my-app" folder consumed about 7GB of disk space. I'm confused by this and would like to understand why this is happening.

This is the sequence of commands I'm running:

npx create-react-app my-app
Enter fullscreen mode Exit fullscreen mode

After running the above command, the "my-app" folder ends up taking up a lot of disk space.

Additionally, every time I run "npx create-react-app my-app" it prompts me:

The following packages need to be installed:
create-react-app@5.0.1
Enter fullscreen mode Exit fullscreen mode

It seems that every time I create a project, I will be prompted to install the software package. Why not cache them?

Can someone explain why the disk space consumption is so high and why the packages are not cached?

Every time a project is created, the size of the node_modules folder in the project folder automatically increases.

Image description

Image description

Every time I create a new project, I have to wait for nearly 1hours. There is no network speed problem here.

Top comments (0)