Why npm ci
removes the node_modules
/ all packages?
If a
node_modules
is already present, it will be automatically removed beforenpm ci
begins its install.
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.