Skip to content

Building on Windows: misleading messages when ClangCL is missingΒ #61437

@MikeMcC399

Description

@MikeMcC399

Situation

Starting with Node.js 24, ClangCL is required to compile on Windows. (see BUILDING.md).

When executing .\vcbuild on Windows in v24.x and higher branches, if Visual Studio is installed without ClangCL, then the logs can be misinterpreted:

Using ClangCL because the Node.js version being compiled is >= 24.
Looking for Visual Studio 2026
Looking for Visual Studio 2022
Failed to find a suitable Visual Studio installation or Clang compiler/LLVM toolset.

"Using ClangCL" sounds as though ClangGL has been found and then combined with the other lines it sounds like Visual Studio wasn't found. In fact Visual Studio was found and it is just ClangCL that is missing.

Steps to reproduce

In PowerShell on Windows 11 25H2:

git clone https://github.com/nodejs/node.git
cd node
git checkout main # if already cloned
.\vcbuild

Logs

.\vcbuild
Looking for Python
Python found in C:\Users\mikem\AppData\Local\Microsoft\WindowsApps\\python.exe
Python 3.14.2
Looking for NASM
Using ClangCL because the Node.js version being compiled is >= 24.
Looking for Visual Studio 2026
Looking for Visual Studio 2022
Failed to find a suitable Visual Studio installation or Clang compiler/LLVM toolset.
Try to run in a "Developer Command Prompt" or consult
https://github.com/nodejs/node/blob/HEAD/BUILDING.md#windows

Suggestion

In vcbuild.bat:

  1. Change the text from "Using ClangCL ..." to "ClangCL is required because the Node.js version being compiled is >= 24." or similar.

echo Using ClangCL because the Node.js version being compiled is ^>= 24.

  1. Change "Failed to find a suitable Visual Studio installation or Clang compiler/LLVM toolset." to
    "Failed to find a suitable Visual Studio installation with Clang compiler/LLVM toolset.". In other words, change "or" to "with".

if defined clang_cl set "clang_echo= or Clang compiler/LLVM toolset"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions