You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So with npm there are a couple of ways to install dependencies. When you are developing, you tend to npm i --save xxxx etc. These actions create a lock file packages-lock.json which describes everything installed and their versions, etc.
If you have no lock file, or just npm i on a fresh checkout, each person may get different dependency versions (usually something newer that is not expected to change, but might actually break things). As a dev this is a good way to be forced to keep on top of some things.
For an install of dependencies that are pinned to the exact same versions (all the way down) you use npm ci instead. In that case you end us with a deterministic install.
Currently, you do something like this npm i && npm ci which might as well be npm i && npm i.
Steps to reproduce
just run as is
Expected behavior
I think you want deterministic installs so builds don't break for unknown reasons.
The way to do this is to remove packages-lock.json from .gitignore and commit it.
Then in the github actions just run npm ci which means npm install using the lock file. You will never have npm i in build system.
Activity
ashvardanian commentedon Jan 5, 2024
Agreed, @sroussey! Would you be able to submit a PR?
sroussey commentedon Jan 5, 2024
Working on it. 😁
Use npi ci
Make: `npi ci` (#330)
Make: `npi ci` (unum-cloud#330)