Skip to content

Install pinned pnpm on Azure DevOps build agents - #11661

Merged
Heejae Chang (heejaechang) merged 1 commit into
mainfrom
user/heejaechang/fix-pnpm-ci-install
Aug 19, 2026
Merged

Heejae Chang (heejaechang) merged 1 commit into
mainfrom
user/heejaechang/fix-pnpm-ci-install

Conversation

@heejaechang

@heejaechang Heejae Chang (heejaechang) commented Aug 19, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

PR #11652 migrated CI package installation from npm to pnpm, but the Azure DevOps agent image ships Node without pnpm. Since it merged, every ADO build fails at pnpm run install:all with:

pnpm: command not found   (exit 127)

package.json pins "packageManager": "[email protected]", but UseNode@1 does not enable corepack, and corepack can't fetch pnpm in the restricted-network build anyway.

Fix

Provision the pinned pnpm before it is used. Add npm run installPinnedPackageManager (a thin npm install --global pnpm@<pinned> wrapper that reads the version from package.json) after UseNode@1 in every checkout: self job that runs the pnpm workspace install:

  • azure-pipelines.yml (build)
  • azure-pipelines-release.yml (build_vsix, build_npm)

npm is used for this bootstrap because it honors the pipeline's NPM_CONFIG_USERCONFIG for the authenticated feed. corepack is intentionally not used — it cannot reach the registry in the restricted-network build.

Fix @vscode/vsce invocations that #11652 left broken on a fresh agent (pnpm install -g fails with ERR_PNPM_NO_GLOBAL_BIN_DIR):

  • Manifest generation → pnpm exec vsce generate-manifest (vsce is already a workspace devDependency, so no global install needed).
  • Marketplace publish job (checkout: none, no workspace) → npm install --ignore-scripts=false -g @vscode/[email protected], so its bare vsce publish step finds vsce on PATH.

Testing

  • Both pipeline YAML files parse.
  • installPinnedPackageManager.js mirrors the existing helper pattern; npm install --global [email protected] succeeds under the restricted network.
  • pnpm exec vsce resolves the workspace devDependency; pnpm install -g / bare pnpm exec outside a workspace were confirmed to fail, which is why they are replaced.

@heejaechang
Heejae Chang (heejaechang) force-pushed the user/heejaechang/fix-pnpm-ci-install branch 3 times, most recently from d49dfa6 to 1444cb0 Compare August 19, 2026 19:40
PR #11652 migrated CI package installation from npm to pnpm, but the
Azure DevOps agent image ships Node without pnpm, so every ADO build has
since failed at `pnpm run install:all` with `pnpm: command not found`
(exit 127).

Provision the pinned pnpm (from package.json `packageManager`) via
`npm run installPinnedPackageManager` (a thin `npm install --global`
wrapper) after `UseNode@1` in every `checkout: self` job that runs the
pnpm workspace install. npm is used for this bootstrap because it honors
the pipeline-level `NPM_CONFIG_USERCONFIG` for the authenticated feed;
corepack is not used because it cannot reach the registry in the
restricted-network build.

Also fix the `@vscode/vsce` invocations, which #11652 left broken on a
fresh agent (`pnpm install -g` fails with ERR_PNPM_NO_GLOBAL_BIN_DIR):
- Manifest generation uses `pnpm exec vsce` (vsce is a workspace
  devDependency, so no global install is needed), dropping the broken
  `pnpm install -g` step.
- The marketplace publish job (checkout: none, no workspace) installs
  the pinned vsce globally with
  `npm install --ignore-scripts=false -g @vscode/[email protected]` so its bare
  `vsce publish` step finds it on PATH.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: f86da4ad-6ad1-4c96-93ca-30e1030cd78a
@heejaechang
Heejae Chang (heejaechang) force-pushed the user/heejaechang/fix-pnpm-ci-install branch from 1444cb0 to f9ff3db Compare August 19, 2026 20:04
@heejaechang Heejae Chang (heejaechang) changed the title Install pinned pnpm on ADO build agents (fix CFSClean build break) Install pinned pnpm on Azure DevOps build agents Aug 19, 2026
@heejaechang
Heejae Chang (heejaechang) merged commit 3f87071 into main Aug 19, 2026
12 checks passed
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