better document npm workaround

This commit is contained in:
José Albornoz
2026-03-15 22:23:00 -04:00
committed by Mohamed Boudra
parent ae4123be10
commit 233b309fd9
3 changed files with 19 additions and 5 deletions

View File

@@ -42,10 +42,13 @@ jobs:
run: nix build .#default -o result
- name: Verify lockfile is complete
# npm silently omits resolved/integrity fields in workspace monorepos.
# Nix needs them for offline builds. See https://github.com/npm/cli/issues/4460
run: |
node scripts/fix-lockfile.mjs package-lock.json
git diff --exit-code package-lock.json || {
echo "ERROR: package-lock.json has missing resolved/integrity fields."
echo "This is a known npm bug: https://github.com/npm/cli/issues/4460"
echo "Run 'node scripts/fix-lockfile.mjs' and commit the result."
exit 1
}