3 ms·
> Even with a package lockfile, npm couldn't do that. NPM now has npm ci (which I think should be the default) for that.
by Zababa 5y ago
> Even with a package lockfile, npm couldn't do that.
NPM now has npm ci (which I think should be the default) for that.
- zdragnar 5y agoIs there a way to install another package / add one to package.json and update the lockfile while otherwise preserving the behavior of running npm ci? If so, ignore this, but if not, wouldn't adding a new package have all sorts of weird side effects from miscellaneous updates to irrelevant existing dependencies?
- mmis1000 5y agoIt is the default. So it ends up with un-optimized structure sometimes. Because the top package is locked and does not meet the version new package required. In order to satisfy the constraint. Npm will install second copy of the package in nested directory. And npm also have a `dedup` command for you to `screw it, change the version in lock and merge them if possible`.