Skip to content

fix: run Renovate lockfile updates on npm 11 - #238

Merged
ecv merged 1 commit into
mainfrom
renovate-npm-below-12
Nov 18, 2026
Merged

ecv merged 1 commit into
mainfrom
renovate-npm-below-12

Conversation

@ecv

@ecv ecv commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Renovate cannot update npm dependencies in this repository: every lockfile update fails, so its pull requests (#236) carry a package.json change with no matching package-lock.json. The same failure blocks the security fix datum-cloud/staff-portal#827 in staff-portal.

With this change Renovate uses npm 11 here until npm 12 ships a fix for npm/cli#9800. npm's remote-download guard stays on: nothing relaxes allow-remote, here or org-wide.

Cause. No npm version is pinned here (no engines.npm, no packageManager, and lockfileVersion 3 implies no limit), so Renovate runs the newest npm, 12.x. npm 12 refuses the registry tarball of @tailwindcss/oxide-wasm32-wasi because that package declares bundleDependencies:

npm error code EALLOWREMOTE
npm error Refusing to fetch "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.5.tgz"

Change. "constraints": {"npm": "<12"} in renovate.json. Renovate checks config.constraints.npm before it derives a version from package.json or the lockfile (resolveToolConstraint, called from npm/post-update/npm.ts). The hosted Renovate app installs the npm version that satisfies the constraint.

macOS packaging folder. ui/packaging/dmg/package-lock.json fails on every npm version with EBADPLATFORM: appdmg declares os: darwin and Renovate runs on Linux. The change adds ui/packaging/dmg/** to ignorePaths, so Renovate stops proposing updates for appdmg, patch-package and the image-size override there. The release workflow still installs them with npm ci on macOS. Two other options were rejected:

  • .npmrc with os=darwin in that folder does not work. On Linux, npm 11.21.2 reads os as darwin and still fails the appdmg platform check, because the setting only selects optional dependencies.
  • force=true gets past the check, but it also turns off npm's other install checks, including in the macOS release job.

ignorePaths replaces the preset list instead of merging with it, so the config:recommended defaults are restated beside the new path.

Expect npm 11 to add inBundle entries under @tailwindcss/oxide-wasm32-wasi/node_modules/ to the lockfile. These carry no resolved URL, because their files ship inside the registry tarball.

Removing the constraint is tracked in datum-cloud/staff-portal#848.

Test plan

Reproduced Renovate's command (npm install --package-lock-only --no-audit --ignore-scripts, plus the name@version arguments Renovate passes for lockfile-only updates) in node:24-bookworm, with Renovate's replace-registry-host=always npmrc:

Renovate cannot regenerate the lockfiles here. With no npm pin in the
repository it runs npm 12, which refuses to fetch the registry tarball of
@tailwindcss/oxide-wasm32-wasi because that package declares
bundleDependencies (npm/cli#9800). Every npm update, security fixes
included, lands without a lockfile.

Key changes:
- Constrain Renovate's npm to <12 for this repository only. npm 11
  regenerates ui/package-lock.json with every resolved URL on
  registry.npmjs.org, and npm's remote-download guard stays on.
- Skip ui/packaging/dmg. appdmg is macOS-only and Renovate runs on Linux,
  so npm fails there with EBADPLATFORM on any version. npm's os setting
  does not lift that check, and force would turn off its other checks.
  ignorePaths replaces the preset list, so the defaults are restated.

Drop the npm constraint once npm 12 ships the fix.
@ecv
ecv merged commit 5bf4906 into main Nov 18, 2026
7 checks passed
@ecv
ecv deleted the renovate-npm-below-12 branch November 18, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants