Repository navigation
Install pinned pnpm on Azure DevOps build agents - #11661
Merged
Heejae Chang (heejaechang) merged 1 commit intoAug 19, 2026
Merged
Conversation
Heejae Chang (heejaechang)
force-pushed
the
user/heejaechang/fix-pnpm-ci-install
branch
3 times, most recently
from
August 19, 2026 19:40
d49dfa6 to
1444cb0
Compare
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
Heejae Chang (heejaechang)
force-pushed
the
user/heejaechang/fix-pnpm-ci-install
branch
from
August 19, 2026 20:04
1444cb0 to
f9ff3db
Compare
Bill Schnurr (bschnurr)
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:allwith:package.jsonpins"packageManager": "[email protected]", butUseNode@1does 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 thinnpm install --global pnpm@<pinned>wrapper that reads the version frompackage.json) afterUseNode@1in everycheckout: selfjob 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_USERCONFIGfor the authenticated feed. corepack is intentionally not used — it cannot reach the registry in the restricted-network build.Fix
@vscode/vsceinvocations that #11652 left broken on a fresh agent (pnpm install -gfails withERR_PNPM_NO_GLOBAL_BIN_DIR):pnpm exec vsce generate-manifest(vsce is already a workspace devDependency, so no global install needed).checkout: none, no workspace) →npm install --ignore-scripts=false -g @vscode/[email protected], so its barevsce publishstep finds vsce on PATH.Testing
installPinnedPackageManager.jsmirrors the existing helper pattern;npm install --global [email protected]succeeds under the restricted network.pnpm exec vsceresolves the workspace devDependency;pnpm install -g/ barepnpm execoutside a workspace were confirmed to fail, which is why they are replaced.