I noticed a failing build on my CI, because I deleted the package-lock.json
, because it seemed out of date anyway since I'm using pnpm
. A proper package-lock.json
does seem to be required though.
It's probably possible to run npm install --package-lock-only
with a pre-push hook if the package.json was updated, but this takes a while and isn't very convenient.
Is there something I'm missing? I think this functionality should be built into pnpm
to improve compatibility.
EDIT:
I don't think switching to pnpm
on my CI is an option, since I'm writing a library that I want people to be able to install using npm
.
npm
andyarn
would be using the shrinkwrap.yaml, which they aren't. This is evident from having usedpnpm
while developing and the build failing in the CI usingnpm
.