Skip to content

Unable to build node.js in Windows with VS2022 #5070

Closed as not planned
Closed as not planned

Description

@sabari-srk

Node.js Version

v22.16.0

NPM Version

NA

Operating System

Windows

Subsystem

v8

Description

Hi ,

I am trying to build node.js v22.16.0 on Windows 11 .
But ran into errors while building

Image

Minimal Reproduction

I have got the prerequisite by running the command

winget configure ..configurations\configuration.dsc.yaml

I have cloned the repo and tried .\vcbuild as mentioned in
https://github.com/nodejs/node/blob/v22.16.0/BUILDING.md#building-nodejs-2

Output

C:\node\deps\v8\src\heap\cppgc\marking-state.h(345,52): error C2352: 'cppgc::internal::MarkingStateBase::MarkNoPush': a call of a non-static member function requires an object [C:\node\tools\v8_gypfiles\v8_comp
iler.vcxproj]
(compiling source file '../msvs/pch/v8_pch.cc')
C:\node\deps\v8\src\heap\cppgc\marking-state.h(84,24):
see declaration of 'cppgc::internal::MarkingStateBase::MarkNoPush'

C:\node\deps\v8\src\heap\cppgc\marking-state.h(345,52): error C2352: 'cppgc::internal::MarkingStateBase::MarkNoPush': a call of a non-static member function requires an object [C:\node\tools\v8_gypfiles\v8_init
.vcxproj]
(compiling source file '../../deps/v8/src/init/setup-isolate-full.cc')
C:\node\deps\v8\src\heap\cppgc\marking-state.h(84,24):
see declaration of 'cppgc::internal::MarkingStateBase::MarkNoPush'

C:\node\deps\v8\src\heap\cppgc\marking-state.h(345,52): error C2352: 'cppgc::internal::MarkingStateBase::MarkNoPush': a call of a non-static member function requires an object [C:\node\tools\v8_gypfiles\v8_init
ializers_slow.vcxproj]
(compiling source file '../../out/Release/obj/global_intermediate/torque-generated/src/builtins/js-to-wasm-tq-csa.cc')
C:\node\deps\v8\src\heap\cppgc\marking-state.h(84,24):
see declaration of 'cppgc::internal::MarkingStateBase::MarkNoPush'

C:\node\deps\v8\src\heap\cppgc\marking-state.h(345,52): error C2352: 'cppgc::internal::MarkingStateBase::MarkNoPush': a call of a non-static member function requires an object [C:\node\tools\v8_gypfiles\v8_init
ializers_slow.vcxproj]
(compiling source file '../../out/Release/obj/global_intermediate/torque-generated/src/builtins/wasm-to-js-tq-csa.cc')
C:\node\deps\v8\src\heap\cppgc\marking-state.h(84,24):
see declaration of 'cppgc::internal::MarkingStateBase::MarkNoPush'

v8_pch.cc
Assembling ....\deps\v8\src\heap\base\asm\x64\push_registers_masm.asm...
C:\node\deps\v8\src\base\bits.h(477,31): warning C4146: unary minus operator applied to unsigned type, result still unsigned [C:\node\tools\v8_gypfiles\v8_turboshaft.vcxproj]
(compiling source file '../msvs/pch/v8_pch.cc')

v8_pch.cc
C:\node\deps\v8\src\base\bits.h(477,31): warning C4146: unary minus operator applied to unsigned type, result still unsigned [C:\node\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
(compiling source file '../msvs/pch/v8_pch.cc')

C:\node\deps\v8\src\heap\cppgc\marking-state.h(345,52): error C2352: 'cppgc::internal::MarkingStateBase::MarkNoPush': a call of a non-static member function requires an object [C:\node\tools\v8_gypfiles\v8_turb
oshaft.vcxproj]
(compiling source file '../msvs/pch/v8_pch.cc')
C:\node\deps\v8\src\heap\cppgc\marking-state.h(84,24):
see declaration of 'cppgc::internal::MarkingStateBase::MarkNoPush'

C:\node\deps\v8\src\heap\cppgc\marking-state.h(345,52): error C2352: 'cppgc::internal::MarkingStateBase::MarkNoPush': a call of a non-static member function requires an object [C:\node\tools\v8_gypfiles\v8_base
_without_compiler.vcxproj]
(compiling source file '../msvs/pch/v8_pch.cc')
C:\node\deps\v8\src\heap\cppgc\marking-state.h(84,24):
see declaration of 'cppgc::internal::MarkingStateBase::MarkNoPush'

Before You Submit

  • I have looked for issues that already exist before submitting this
  • My issue follows the guidelines in the README file, and follows the 'How to ask a good question' guide at https://stackoverflow.com/help/how-to-ask

Activity

  1. avivkeller commented on Jul 9, 2025

    @avivkeller
    Member

    @nodejs/platform-windows


    Can you please provide more information about your system, such as the VSCode version (exact), etc

  2. sabatale commented on Aug 7, 2025

    @sabatale

    Same error. Windows with VS 2022 17.14.11, Python 3.12 and Node v22.14.0.

  3. Tiantian-kaixin commented on Aug 8, 2025

    @Tiantian-kaixin

    change MutatorMarkingState::BasicMarkingState::MarkNoPush(header); to BasicMarkingState::MarkNoPush(header); work for me

  4. JulianGro commented on Oct 20, 2025

    @JulianGro

    Qt was also affected by the issue and accepted the change: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/646656

  5. avivkeller commented on Jan 3, 2026

    @avivkeller
    Member

    This is an issue with V8, not Node.js. I suggest opening a PR in their respective tracker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions