1

Why npm ci removes the node_modules / all packages?

If a node_modules is already present, it will be automatically removed before npm ci begins its install.

BuZZ-dEE
  • 6,075
  • 12
  • 66
  • 96

1 Answers1

1

To make sure you are always in the correct state, even if you, or someone else (meaning, some other tool or such), somehow fiddled with node_modules.

It tries to get to a state as if you just installed the module from zero.

Karel Bílek
  • 36,467
  • 31
  • 94
  • 149