Skip to content

ci: pin pipeline to Node 22 to match packageManager (npm 10)#559

Merged
heyitsaamir merged 1 commit into
mainfrom
fix/package-lock
May 6, 2026
Merged

ci: pin pipeline to Node 22 to match packageManager (npm 10)#559
heyitsaamir merged 1 commit into
mainfrom
fix/package-lock

Conversation

@heyitsaamir
Copy link
Copy Markdown
Collaborator

Problem

The release pipeline fails on npm ci with errors like:

npm error Missing: turbo-windows-arm64@2.8.11 from lock file
npm error Missing: @esbuild/win32-arm64@0.25.12 from lock file
...

Root cause

The pipeline's NodeTool@0 task uses versionSpec: '24.x', which provisions Node 24 + npm 11. However:

  • This repo pins "packageManager": "npm@10.8.1" in package.json.
  • npm 10 only records platform-specific optional dependencies for the current platform when generating package-lock.json (so a lockfile generated on macOS only contains Mac binaries for @esbuild/* and turbo-*).
  • npm 11 requires all platform binaries to be present in the lockfile and treats missing ones as out-of-sync, failing npm ci.

Lockfile is valid under npm 10 — npm ci succeeds locally. The mismatch is purely between the pipeline's npm and the project's pinned npm.

Fix

Pin the pipeline to Node 22 (LTS), which ships with npm 10, matching the packageManager field and every developer's local environment.

Alternative considered

Bumping the project to npm 11 (update packageManager, regenerate lockfile under npm 11, force every dev to upgrade). Rejected as larger blast radius for an unblock-the-release fix.

Follow-up

This same change needs to be cherry-picked to release to unblock the 2.0.10 publish.

Node 24 ships with npm 11, which requires platform-specific optional
dependencies for all platforms to be present in package-lock.json.
Lockfiles generated by npm 10 (per packageManager pin) only include
the current platform's binaries, causing 'npm ci' to fail on Windows
agents with 'Missing: @esbuild/win32-... from lock file' errors.

Aligning the pipeline with Node 22 (npm 10) matches the local dev
environment and unblocks the release pipeline.
Copilot AI review requested due to automatic review settings May 6, 2026 21:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Pins the Azure DevOps publish pipeline’s Node version to avoid npm ci lockfile validation failures caused by a Node/npm version mismatch.

Changes:

  • Switches pipeline NodeTool from Node 24.x to Node 22.x
  • Updates the task display name accordingly

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .azdo/publish.yml
@heyitsaamir heyitsaamir merged commit df98b25 into main May 6, 2026
13 checks passed
@heyitsaamir heyitsaamir deleted the fix/package-lock branch May 6, 2026 22:25
heyitsaamir added a commit that referenced this pull request May 6, 2026
Cherry-pick of #559 onto `release` to unblock the 2.0.10 publish
pipeline.

## Why

The publish pipeline fails on `npm ci` on Windows agents because Node 24
ships npm 11, which is stricter than the npm 10 pinned in
`packageManager`. See #559 for full root-cause analysis.

## Change

Pins the `NodeTool@0` task in `.azdo/publish.yml` from `24.x` to `22.x`
(npm 10). One-line fix, no lockfile or dependency changes.

## After merge

Re-trigger the [release
pipeline](https://dev.azure.com/DomoreexpGithub/Github_Pipelines/_build?definitionId=52&_a=summary)
on `release` with **Public** publish type to ship 2.0.10.
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.

3 participants