Version 11 helpfully installs Windows build tools making the whole process a bit less painful. Unfortunately, it seems to try to run two copies of node-pre-gyp at the same time:
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\common.py", line 393, in close
os.rename(self.tmp_path, filename)
WindowsError: [Error 183] Cannot create a file when that file already exists
Using the script below, I could manually build the modules, then run npm rebuild noble-uwp to finish off. Hopefully, this may help someone else.
set node="C:\Program Files\nodejs\node.exe"
set node_gyp="C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js"
set proj_dir=
set uwp_dir=%proj_dir%\node_modules\noble-uwp\uwp
set module_dir=%uwp_dir%\windows.foundation
cd %module_dir%
set module=%module_dir%\binding\node-v67-win32-x64\binding.node
set module_path=%module_dir%\binding\node-v67-win32-x64
%node% %node_gyp% "configure" "--fallback-to-build" "--msvs_version=2015" "--module=%module%" "--module_name=binding" "--module_path=%module_path%"
%node% %node_gyp% "build" "--fallback-to-build" "--msvs_version=2015" "--module=%module%" "--module_name=binding" "--module_path=%module_path%"
set module_dir=%uwp_dir%\windows.storage.streams
cd %module_dir%
set module=%module_dir%\binding\node-v67-win32-x64\binding.node
set module_path=%module_dir%\binding\node-v67-win32-x64
%node% %node_gyp% "configure" "--fallback-to-build" "--msvs_version=2015" "--module=%module%" "--module_name=binding" "--module_path=%module_path%"
%node% %node_gyp% "build" "--fallback-to-build" "--msvs_version=2015" "--module=%module%" "--module_name=binding" "--module_path=%module_path%"
set module_dir=%uwp_dir%\windows.devices.bluetooth
cd %module_dir%
set module=%module_dir%\binding\node-v67-win32-x64\binding.node
set module_path=%module_dir%\binding\node-v67-win32-x64
%node% %node_gyp% "configure" "--fallback-to-build" "--msvs_version=2015" "--module=%module%" "--module_name=binding" "--module_path=%module_path%"
%node% %node_gyp% "build" "--fallback-to-build" "--msvs_version=2015" "--module=%module%" "--module_name=binding" "--module_path=%module_path%"
set module_dir=%uwp_dir%\windows.devices.bluetooth.advertisement
cd %module_dir%
set module=%module_dir%\binding\node-v67-win32-x64\binding.node
set module_path=%module_dir%\binding\node-v67-win32-x64
%node% %node_gyp% "configure" "--fallback-to-build" "--msvs_version=2015" "--module=%module%" "--module_name=binding" "--module_path=%module_path%"
%node% %node_gyp% "build" "--fallback-to-build" "--msvs_version=2015" "--module=%module%" "--module_name=binding" "--module_path=%module_path%"
set module_dir=%uwp_dir%\windows.devices.bluetooth.genericattributeprofile
cd %module_dir%
set module=%module_dir%\binding\node-v67-win32-x64\binding.node
set module_path=%module_dir%\binding\node-v67-win32-x64
%node% %node_gyp% "configure" "--fallback-to-build" "--msvs_version=2015" "--module=%module%" "--module_name=binding" "--module_path=%module_path%"
%node% %node_gyp% "build" "--fallback-to-build" "--msvs_version=2015" "--module=%module%" "--module_name=binding" "--module_path=%module_path%"
set module_dir=%uwp_dir%\windows.devices.enumeration
cd %module_dir%
set module=%module_dir%\binding\node-v67-win32-x64\binding.node
set module_path=%module_dir%\binding\node-v67-win32-x64
%node% %node_gyp% "configure" "--fallback-to-build" "--msvs_version=2015" "--module=%module%" "--module_name=binding" "--module_path=%module_path%"
%node% %node_gyp% "build" "--fallback-to-build" "--msvs_version=2015" "--module=%module%" "--module_name=binding" "--module_path=%module_path%"
set module_dir=%uwp_dir%\windows.devices.radios
cd %module_dir%
set module=%module_dir%\binding\node-v67-win32-x64\binding.node
set module_path=%module_dir%\binding\node-v67-win32-x64
%node% %node_gyp% "configure" "--fallback-to-build" "--msvs_version=2015" "--module=%module%" "--module_name=binding" "--module_path=%module_path%"
%node% %node_gyp% "build" "--fallback-to-build" "--msvs_version=2015" "--module=%module%" "--module_name=binding" "--module_path=%module_path%"
Version 11 helpfully installs Windows build tools making the whole process a bit less painful. Unfortunately, it seems to try to run two copies of node-pre-gyp at the same time:
Which leads to an error like:
Using the script below, I could manually build the modules, then run
npm rebuild noble-uwp
to finish off. Hopefully, this may help someone else.