nwjs / nw-gyp

native addon build tool for node-webkit
MIT License
195 stars 46 forks source link

Windows 11 SDK not recognized #158

Open msojocs opened 10 months ago

msojocs commented 10 months ago
Log Debugger attached. > napi-study@1.0.0 build-nw D:\GitHub\napi-study > nw-gyp rebuild --debug --arch=x64 --target=0.54.1 Debugger attached. gyp info it worked if it ends with ok gyp info using nw-gyp@3.6.6 gyp info using node@16.18.0 | win32 | x64 gyp ERR! find VS gyp ERR! find VS msvs_version not set from command line or npm config gyp ERR! find VS running in VS Command Prompt, installation path is: gyp ERR! find VS "D:\Program Files\Microsoft Visual Studio\2022\Professional" gyp ERR! find VS - will only use this version gyp ERR! find VS checking VS2022 (17.7.34024.191) found at: gyp ERR! find VS "d:\Program Files\Microsoft Visual Studio\2022\Professional" gyp ERR! find VS - found "Visual Studio C++ core features" gyp ERR! find VS - found VC++ toolset: v143 gyp ERR! find VS - missing any Windows SDK gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use gyp ERR! find VS looking for Visual Studio 2015 gyp ERR! find VS - not found gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 gyp ERR! find VS gyp ERR! find VS ************************************************************** gyp ERR! find VS You need to install the latest version of Visual Studio gyp ERR! find VS including the "Desktop development with C++" workload. gyp ERR! find VS For more information consult the documentation at: gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows gyp ERR! find VS ************************************************************** gyp ERR! find VS gyp ERR! UNCAUGHT EXCEPTION

I found no win11 support when debugging. image

node-gyp has code to support win11 sdk: https://github.com/nodejs/node-gyp/blob/d3615c66f7e7a65de48ce9860b1fe13710d20988/lib/find-visualstudio.js#L324