Unable to build node.js in Windows with VS2022
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
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
- [x] I have looked for issues that already exist before submitting this
- [x] 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
@nodejs/platform-windows
Can you please provide more information about your system, such as the VSCode version (exact), etc
Same error. Windows with VS 2022 17.14.11, Python 3.12 and Node v22.14.0.
change MutatorMarkingState::BasicMarkingState::MarkNoPush(header); to BasicMarkingState::MarkNoPush(header); work for me
Qt was also affected by the issue and accepted the change: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/646656