Hacker News new | ask | show | jobs
by deergomoo 1782 days ago
> I run "npm install" and the package-lock.json ends up changing

This is intended behaviour, but seems totally counterintuitive to me. I’m with you, I’m used to Composer and NPM just seems inscrutable at times.

For reference, the approximate equivalent to `composer install` is `npm ci`. This will install the exact versions from package.lock without changing it, however it will also blow away your node_modules directory and install from scratch each time.