Skip to content

Fix Azure CI by specifying Node.js 20.x version#1626

Merged
wenytang-ms merged 1 commit intomainfrom
fix/ci-specify-node-version
Apr 10, 2026
Merged

Fix Azure CI by specifying Node.js 20.x version#1626
wenytang-ms merged 1 commit intomainfrom
fix/ci-specify-node-version

Conversation

@wenytang-ms
Copy link
Copy Markdown
Contributor

Problem

The Azure CI pipeline (ci.yml) vsce package step was failing with:

ReferenceError: File is not defined
    at undici/lib/web/webidl/index.js:537

Root Cause

ci.yml did not specify a Node.js version, relying on the pre-installed version on the 1ES_JavaTooling_Ubuntu-2004 image (likely Node 18.x). The latest @vscode/vsce pulls in undici, which uses the File global API - only available in Node.js 20+.

Other Azure pipelines (nightly.yml, rc.yml) and the GitHub workflow (build.yml) already specify Node 20.x. Only ci.yml was missing it.

Fix

Add NodeTool@0 task with versionSpec 20.x before npm install, consistent with all other pipelines.

The CI pipeline was failing because it didn't specify a Node.js version,
relying on the pre-installed version on the build image (likely Node 18.x).
The latest @vscode/vsce uses undici which requires the File global API,
only available in Node.js 20+. This caused 'ReferenceError: File is not
defined' during vsce package.

Add NodeTool@0 task with Node 20.x to align with the GitHub workflow and
other Azure pipelines (nightly.yml, rc.yml) which already specify Node 20.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

@wenytang-ms wenytang-ms merged commit d9ea911 into main Apr 10, 2026
8 checks passed
@wenytang-ms wenytang-ms deleted the fix/ci-specify-node-version branch April 10, 2026 06:33
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