Skip to content

ci: remove --no-optional from vscode dependency install (fix #9140)#9180

Open
vhvb1989 wants to merge 1 commit into
mainfrom
vhvb1989/fix-9140-esbuild-no-optional
Open

ci: remove --no-optional from vscode dependency install (fix #9140)#9180
vhvb1989 wants to merge 1 commit into
mainfrom
vhvb1989/fix-9140-esbuild-no-optional

Conversation

@vhvb1989

Copy link
Copy Markdown
Member

Summary

Fixes #9140.

The azure-dev - vscode ADO pipeline Test task fails on all three OSes for any PR touching ext/vscode with:

Error: The package "@esbuild/<platform>" could not be found, and is needed by esbuild.

Root cause

The dependency install step used npm ci --no-optional. esbuild ships its platform-specific binary (@esbuild/<platform>) as an optional dependency, so --no-optional drops it, breaking both build:esbuild and the extension-host test runner. Recent global npm (npm i -g npm) strictly honors --no-optional, which is why this regressed silently on ADO while GitHub Actions (using setup-node's bundled npm) stayed green.

Change

Remove --no-optional from the dependency install step in:

  • eng/pipelines/templates/jobs/vscode-build.yml (ADO job)
  • .github/workflows/vscode-ci.yml (GitHub Actions, for parity)

esbuild ships its platform-specific binary (@esbuild/<platform>) as an
optional dependency. Installing with 'npm ci --no-optional' drops that
binary, causing the vscode ADO pipeline Test task to fail on all three
OSes with '@esbuild/<platform> could not be found'.

Remove --no-optional from both the ADO job and the GitHub Actions
workflow so the correct esbuild platform binary is installed.

Fixes #9140

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bfac0afb-0a7c-4406-93f8-ee4506b494e6
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
22 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@vhvb1989
vhvb1989 marked this pull request as ready for review July 16, 2026 20:25
Copilot AI review requested due to automatic review settings July 16, 2026 20:25
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
22 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

Copy link
Copy Markdown

📋 Prioritization Note

Thanks for the contribution! The linked issue isn't in the current milestone yet.
Thank you for logging this issue; our team is reviewing it. If you need urgent prioritization, tag @RickWinter and @kristenwomack to let us know.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The same npm ci --no-optional pattern (with a preceding global npm i -g npm) is still in eng/pipelines/templates/jobs/build-scan-vscode.yml line 38. That job runs ci-package.ps1 -> npm run build:esbuild -> node esbuild.mjs, so it'll hit the same missing @esbuild/<platform> failure the moment it runs. It's wired into the build-notice pipeline rather than the PR gate, so it doesn't block here, but it has the identical latent bug. Worth dropping --no-optional there too for parity while you're in this area.

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.

ADO vscode pipeline fails: esbuild platform binary dropped by 'npm ci --no-optional'

3 participants