Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

NPM is unexpectedly taking up 10gb of storage on computer #18680

Open
3 tasks
Marak opened this issue Oct 1, 2017 · 6 comments
Open
3 tasks

NPM is unexpectedly taking up 10gb of storage on computer #18680

Marak opened this issue Oct 1, 2017 · 6 comments

Comments

@Marak
Copy link

Marak commented Oct 1, 2017

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • [x ] npm is doing something I don't understand.
  • Other (see below for feature requests):

What's going wrong?

NPM is unexpectedly taking up 10 gigabytes of storage on my computer.

How can the CLI team reproduce the problem?

Running this command in home directory:

find . -type d -name node_modules ! -wholename '*/node_modules/*' | xargs du -sch

supporting information:

  • npm -v prints: 5.4.2
  • node -v prints: v8.2.1
  • npm config get registry prints: https://registry.npmjs.org/
  • Windows, OS X/macOS, or Linux?: OS X/macOS
@Klathmon
Copy link

Klathmon commented Oct 1, 2017

Are you installing anything in particular that is causing this issue? Or is this just a complaint about data usage in general?

@ericmccarthy7
Copy link

You could always use something like this

@ksmithut
Copy link

ksmithut commented Oct 1, 2017

Steps to reproduce? Is this scanning every sub directory in your directory scanning every project you have on your computer with a node_modules directory?

@Marak
Copy link
Author

Marak commented Oct 1, 2017

Thanks @ericmccarthy7, workspaces in yarn seem like right idea.

Most of the space is due to various babel installs on projects each taking 600+mb each.

@Lindsor
Copy link

Lindsor commented Oct 1, 2017

Yeah this is scanning all your modules in all your projects. Everytime you run npm install it downloads all the packages again. This is not an npm issue

@himanshub16
Copy link

In tried creating a react-native app. The node_modules directory took about 600 MB

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants