Skip to content

Commit 8828764

Browse files
fix(release): install (not ci) on the FreeBSD legs
FreeBSD's pkg ships a newer npm than the GitHub-hosted node22 runners, and that newer npm fails `npm ci` on the @retrigger/core-* platform optionalDependencies: they have no resolved nodes in the lock because they are unpublished (404) until this release publishes them, and strict npm counts that as a package.json vs package-lock.json desync ("Missing ... from lock file", EUSAGE). The exact committed lock passes `npm ci` on npm 11.0.0 in clean isolation, so the lock is not the defect -- the npm version is. Use `npm install` on the two FreeBSD build legs, which reconciles rather than strictly validating; the hosted runners keep `npm ci`. verify-published-freebsd already installs from the registry.
1 parent 6d6a1ae commit 8828764

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,12 @@ jobs:
175175
set -eu
176176
. "$HOME/.cargo/env"
177177
cd src/bindings/nodejs
178-
npm ci --no-audit --no-fund
178+
# `npm install`, not `npm ci`: FreeBSD's pkg ships a newer, stricter npm
179+
# that fails `npm ci` because the unpublished @retrigger/core-* platform
180+
# optionalDependencies have no resolved nodes in the lock (they 404 until
181+
# the release publishes them). install reconciles instead of strictly
182+
# validating, so the leg is not blocked by a chicken-and-egg.
183+
npm install --no-audit --no-fund
179184
npm run build
180185
npm test
181186
npm run test:pack

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,12 @@ jobs:
275275
set -eu
276276
. "$HOME/.cargo/env"
277277
cd "$NODE_DIR"
278-
npm ci --no-audit --no-fund
278+
# `npm install`, not `npm ci`: FreeBSD's pkg ships a newer, stricter npm
279+
# that fails `npm ci` because the unpublished @retrigger/core-* platform
280+
# optionalDependencies have no resolved nodes in the lock (they 404 until
281+
# this very release publishes them). install reconciles instead of
282+
# strictly validating, so the build leg is not blocked by a chicken-and-egg.
283+
npm install --no-audit --no-fund
279284
npm run build
280285
node scripts/verify-artifact.js
281286
test -f retrigger-nodejs-bindings.freebsd-x64.node

0 commit comments

Comments
 (0)