Colin Sygiel
Colin Sygiel

Reputation: 947

Why does installing an npm package re-install all my other packages?

I have this annoying issue where when I try to install a new package with npm it starts installing all my other packages, often breaking something and forcing me to reinstall my node modules. What could be the problem and how could I fix this?

enter image description here

Upvotes: 1

Views: 834

Answers (1)

Alexis Pavlidis
Alexis Pavlidis

Reputation: 1080

It does not install all your other packages, what it does is it just installs all the dependencies in order to actually install the gatsby-source-contentful.

You can see the dependencies of the package in the dependencies tab. Of course, those dependencies might have more dependencies so it's just a chain of installations and updates.

For example the gatsby-source-contentful package, there is a dependency called gatsby-source-filesystem which has a dependency on the file-type so that's why it tries to update that.

Upvotes: 2

Related Questions