Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm rebuild fails for node 23.0.0 #143

Open
korodarn opened this issue Oct 28, 2024 · 2 comments
Open

npm rebuild fails for node 23.0.0 #143

korodarn opened this issue Oct 28, 2024 · 2 comments

Comments

@korodarn
Copy link

Failing to build, errors below, this is on Windows, using VS 2022 with latest updates

PS C:\Users\me\git\parent-project\my-project> npm rebuild (node:47920) ExperimentalWarning: Support for loading ES Module in require() is an experimental feature and might change at any time (Use node --trace-warnings ...to show where the warning was created) npm error code 1 npm error path C:\Users\me\git\parent-project\my-project\node_modules\winax npm error command failed npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild npm error main.cpp npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\stdafx.h(3,9): warning C4005: 'NOMINMAX': macro redefinition [C:\Users\me\git\parent-project\my-project\node_modules\winax\build\node_activex.vcxproj] npm error (compiling source file '../src/main.cpp') npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\stdafx.h(3,9): npm error 'NOMINMAX' previously declared on the command line npm error npm error utils.cpp npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\stdafx.h(3,9): warning C4005: 'NOMINMAX': macro redefinition [C:\Users\me\git\parent-project\my-project\node_modules\winax\build\node_activex.vcxproj] npm error (compiling source file '../src/utils.cpp') npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\stdafx.h(3,9): npm error 'NOMINMAX' previously declared on the command line npm error npm error disp.cpp npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\stdafx.h(3,9): warning C4005: 'NOMINMAX': macro redefinition [C:\Users\me\git\parent-project\my-project\node_modules\winax\build\node_activex.vcxproj] npm error (compiling source file '../src/disp.cpp') npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\stdafx.h(3,9): npm error 'NOMINMAX' previously declared on the command line npm error npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(426,55): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'v8::NamedPropertyHandlerConfiguration' [C:\Users\me\git\parent-project\my-project\node_modules\winax\build\node_activex.vcxproj] npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(426,55): npm error 'v8::NamedPropertyHandlerConfiguration::NamedPropertyHandlerConfiguration': no overloaded function could convert all the argument types npm error C:\Users\me\AppData\Local\node-gyp\Cache\23.0.0\include\node\v8-template.h(785,3): npm error could be 'v8::NamedPropertyHandlerConfiguration::NamedPropertyHandlerConfiguration(v8::NamedPropertyGetterCallback,v8::NamedPropertySetterCallback,v8::NamedPropertyQueryCallback,v8::NamedPropertyDeleterCallback,v8::NamedPropertyEnumeratorCallback,v8::Local<v8::Value>,v8::PropertyHandlerFlags)' npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(426,55): npm error 'v8::NamedPropertyHandlerConfiguration::NamedPropertyHandlerConfiguration(v8::NamedPropertyGetterCallback,v8::NamedPropertySetterCallback,v8::NamedPropertyQueryCallback,v8::NamedPropertyDeleterCallback,v8::NamedPropertyEnumeratorCallback,v8::Local<v8::Value>,v8::PropertyHandlerFlags)': cannot convert argument 1 from 'void (__cdecl *)(v8::Local<v8::Name>,const v8::PropertyCallbackInfo<v8::Value> &)' to 'v8::NamedPropertyGetterCallback' npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(426,56): npm error None of the functions with this name in scope match the target type npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(426,55): npm error while trying to match the argument list '(overloaded-function, overloaded-function)' npm error npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(427,57): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'v8::IndexedPropertyHandlerConfiguration' [C:\Users\me\git\parent-project\my-project\node_modules\winax\build\node_activex.vcxproj] npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(427,57): npm error 'v8::IndexedPropertyHandlerConfiguration::IndexedPropertyHandlerConfiguration': no overloaded function could convert all the argument types npm error C:\Users\me\AppData\Local\node-gyp\Cache\23.0.0\include\node\v8-template.h(864,3): npm error could be 'v8::IndexedPropertyHandlerConfiguration::IndexedPropertyHandlerConfiguration(v8::IndexedPropertyGetterCallbackV2,v8::IndexedPropertySetterCallbackV2,v8::IndexedPropertyQueryCallbackV2,v8::IndexedPropertyDeleterCallbackV2,v8::IndexedPropertyEnumeratorCallback,v8::Local<v8::Value>,v8::PropertyHandlerFlags)' npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(427,57): npm error 'v8::IndexedPropertyHandlerConfiguration::IndexedPropertyHandlerConfiguration(v8::IndexedPropertyGetterCallbackV2,v8::IndexedPropertySetterCallbackV2,v8::IndexedPropertyQueryCallbackV2,v8::IndexedPropertyDeleterCallbackV2,v8::IndexedPropertyEnumeratorCallback,v8::Local<v8::Value>,v8::PropertyHandlerFlags)': cannot convert argument 1 from 'void (__cdecl *)(uint32_t,const v8::PropertyCallbackInfo<v8::Value> &)' to 'v8::IndexedPropertyGetterCallbackV2' npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(427,58): npm error None of the functions with this name in scope match the target type npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(427,57): npm error while trying to match the argument list '(overloaded-function, overloaded-function)' npm error npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(968,55): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'v8::NamedPropertyHandlerConfiguration' [C:\Users\me\git\parent-project\my-project\node_modules\winax\build\node_activex.vcxproj] npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(968,55): npm error 'v8::NamedPropertyHandlerConfiguration::NamedPropertyHandlerConfiguration': no overloaded function could convert all the argument types npm error C:\Users\me\AppData\Local\node-gyp\Cache\23.0.0\include\node\v8-template.h(785,3): npm error could be 'v8::NamedPropertyHandlerConfiguration::NamedPropertyHandlerConfiguration(v8::NamedPropertyGetterCallback,v8::NamedPropertySetterCallback,v8::NamedPropertyQueryCallback,v8::NamedPropertyDeleterCallback,v8::NamedPropertyEnumeratorCallback,v8::Local<v8::Value>,v8::PropertyHandlerFlags)' npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(968,55): npm error 'v8::NamedPropertyHandlerConfiguration::NamedPropertyHandlerConfiguration(v8::NamedPropertyGetterCallback,v8::NamedPropertySetterCallback,v8::NamedPropertyQueryCallback,v8::NamedPropertyDeleterCallback,v8::NamedPropertyEnumeratorCallback,v8::Local<v8::Value>,v8::PropertyHandlerFlags)': cannot convert argument 1 from 'void (__cdecl *)(v8::Local<v8::Name>,const v8::PropertyCallbackInfo<v8::Value> &)' to 'v8::NamedPropertyGetterCallback' npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(968,56): npm error None of the functions with this name in scope match the target type npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(968,55): npm error while trying to match the argument list '(overloaded-function, overloaded-function)' npm error npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(969,57): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'v8::IndexedPropertyHandlerConfiguration' [C:\Users\me\git\parent-project\my-project\node_modules\winax\build\node_activex.vcxproj] npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(969,57): npm error 'v8::IndexedPropertyHandlerConfiguration::IndexedPropertyHandlerConfiguration': no overloaded function could convert all the argument types npm error C:\Users\me\AppData\Local\node-gyp\Cache\23.0.0\include\node\v8-template.h(864,3): npm error could be 'v8::IndexedPropertyHandlerConfiguration::IndexedPropertyHandlerConfiguration(v8::IndexedPropertyGetterCallbackV2,v8::IndexedPropertySetterCallbackV2,v8::IndexedPropertyQueryCallbackV2,v8::IndexedPropertyDeleterCallbackV2,v8::IndexedPropertyEnumeratorCallback,v8::Local<v8::Value>,v8::PropertyHandlerFlags)' npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(969,57): npm error 'v8::IndexedPropertyHandlerConfiguration::IndexedPropertyHandlerConfiguration(v8::IndexedPropertyGetterCallbackV2,v8::IndexedPropertySetterCallbackV2,v8::IndexedPropertyQueryCallbackV2,v8::IndexedPropertyDeleterCallbackV2,v8::IndexedPropertyEnumeratorCallback,v8::Local<v8::Value>,v8::PropertyHandlerFlags)': cannot convert argument 1 from 'void (__cdecl *)(uint32_t,const v8::PropertyCallbackInfo<v8::Value> &)' to 'v8::IndexedPropertyGetterCallbackV2' npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(969,58): npm error None of the functions with this name in scope match the target type npm error C:\Users\me\git\parent-project\my-project\node_modules\winax\src\disp.cpp(969,57): npm error while trying to match the argument list '(overloaded-function, overloaded-function)' npm error gyp info it worked if it ends with ok npm error gyp info using [email protected] npm error gyp info using [email protected] | win32 | x64 npm error gyp info find Python using Python version 3.12.7 found at "C:\Program Files\Python312\python.exe" npm error (node:35968) ExperimentalWarning: Support for loading ES Module in require() is an experimental feature and might change at any time npm error (Usenode --trace-warnings ...to show where the warning was created) npm error gyp info find VS using VS2022 (17.11.35327.3) found at: npm error gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Professional" npm error gyp info find VS run with --verbose for detailed information npm error gyp info spawn C:\Program Files\Python312\python.exe npm error gyp info spawn args [ npm error gyp info spawn args 'C:\\Program Files\\nvm\\v23.0.0\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py', npm error gyp info spawn args 'binding.gyp', npm error gyp info spawn args '-f', npm error gyp info spawn args 'msvs', npm error gyp info spawn args '-I', npm error gyp info spawn args 'C:\\Users\\me\\git\\parent-project\\my-project\\node_modules\\winax\\build\\config.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args 'C:\\Program Files\\nvm\\v23.0.0\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args 'C:\\Users\\me\\AppData\\Local\\node-gyp\\Cache\\23.0.0\\include\\node\\common.gypi', npm error gyp info spawn args '-Dlibrary=shared_library', npm error gyp info spawn args '-Dvisibility=default', npm error gyp info spawn args '-Dnode_root_dir=C:\\Users\\me\\AppData\\Local\\node-gyp\\Cache\\23.0.0', npm error gyp info spawn args '-Dnode_gyp_dir=C:\\Program Files\\nvm\\v23.0.0\\node_modules\\npm\\node_modules\\node-gyp', npm error gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\me\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\23.0.0\\\\<(target_arch)\\\\node.lib', npm error gyp info spawn args '-Dmodule_root_dir=C:\\Users\\me\\git\\parent-project\\my-project\\node_modules\\winax', npm error gyp info spawn args '--no-parallel', npm error gyp info spawn args '--generator-output', npm error gyp info spawn args 'C:\\Users\\me\\git\\parent-project\\my-project\\node_modules\\winax\\build', npm error gyp info spawn args '-Goutput_dir=.' npm error gyp info spawn args ] npm error gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe npm error gyp info spawn args [ npm error gyp info spawn args 'build\\binding.sln', npm error gyp info spawn args '/clp:Verbosity=minimal', npm error gyp info spawn args '/nologo', npm error gyp info spawn args '/p:Configuration=Release;Platform=x64' npm error gyp info spawn args ] npm error gyp ERR! build error npm error gyp ERR! stack Error:C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1 npm error gyp ERR! stack at ChildProcess.<anonymous> (C:\Program Files\nvm\v23.0.0\node_modules\npm\node_modules\node-gyp\lib\build.js:216:23) npm error gyp ERR! stack at ChildProcess.emit (node:events:507:28) npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12) npm error gyp ERR! System Windows_NT 10.0.22631 npm error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nvm\\v23.0.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" npm error gyp ERR! cwd C:\Users\me\git\parent-project\my-project\node_modules\winax npm error gyp ERR! node -v v23.0.0 npm error gyp ERR! node-gyp -v v10.2.0 npm error gyp ERR! not ok npm error A complete log of this run can be found in: C:\Users\me\AppData\Local\npm-cache\_logs\2024-10-28T16_58_54_947Z-debug-0.log

@durs
Copy link
Owner

durs commented Oct 28, 2024

try rreplace at the beginning of the file node_modules\winax\src\stdafx.h

#ifndef NOMINMAX
#define NOMINMAX // To remove conflicts with recent v8 code std::numeric_limits::max()
#endif

@durs
Copy link
Owner

durs commented Oct 29, 2024

see [email protected] corrected for node 22, 23

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

No branches or pull requests

2 participants