homebridge/homebridge-config-ui-x

Prebuilt binaries for Windows?

Boon-in-Oz opened this issue · 4 comments

Current Situation

Hi, I'm trying to upgrade my installations under Windows 10 using the following:
https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Windows-10#major-nodejs-version-updates
but I'm stuck trying to build binaries after the warning:
npm ERR! prebuild-install WARN install No prebuilt binaries found (target=20.11.0 runtime=node arch=x64 libc= platform=win32)
I've upgraded node.js from v16.x to v20.11.0.
I've successfully upgraded to npm 10.4.0 and installed Python 3.12.1.
It seems the next step is to install Visual Studio, which I'm not in a position to do.
Are there prebuilt binaries for Windows available anywhere?

A second point, this part of the documentation no longer appears to be correct:
https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Windows-10#windows-build-tools
I tried it and got the following output:
C:\Windows\System32>npm install --global windows-build-tools npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated windows-build-tools@5.2.2: Node.js now includes build tools for Windows. You probably no longer need this tool. See https://github.com/felixrieseberg/windows-build-tools for details.
It then downloaded Python 2.7.15 and vs_BuiltTools.exe, but the installation failed. I've included the full output at the end of my logs.

Thank you for your time.

Logs

Your environment has been set up for using Node.js 20.11.0 (x64) and npm.

C:\Windows\System32>hb-service rebuild
i Rebuilding for Node.js v20.11.0...
npm notice
npm notice New major version of npm available! 7.20.3 -> 10.4.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.4.0
npm notice Run npm install -g npm@10.4.0 to update!
npm notice
npm ERR! code 1
npm ERR! path C:\Users\michael\AppData\Roaming\npm\node_modules\homebridge-config-ui-x\node_modules\node-pty-prebuilt-multiarch
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/check-prebuild.js || prebuild-install || node scripts/install.js
npm ERR! Prebuild binary missing for platform.
npm ERR! prebuild-install WARN install No prebuilt binaries found (target=20.11.0 runtime=node arch=x64 libc= platform=win32)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@20.11.0 | win32 | x64
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python2" can be used
npm ERR! gyp ERR! find Python - "python2" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if Python is C:\Python37\python.exe
npm ERR! gyp ERR! find Python - "C:\Python37\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Python27\python.exe
npm ERR! gyp ERR! find Python - "C:\Python27\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if the py launcher can be used to find Python
npm ERR! gyp ERR! find Python - "py.exe" is not in PATH or produced an error
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the following options:
npm ERR! gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)
npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
npm ERR! gyp ERR! find Python   npm config set python "C:\Path\To\python.exe"
npm ERR! gyp ERR! find Python For more information consult the documentation at:
npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
npm ERR! gyp ERR! stack     at PythonFinder.fail (C:\Users\michael\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:302:47)
npm ERR! gyp ERR! stack     at PythonFinder.runChecks (C:\Users\michael\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\michael\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:200:18)
npm ERR! gyp ERR! stack     at PythonFinder.execFileCallback (C:\Users\michael\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:266:16)
npm ERR! gyp ERR! stack     at exithandler (node:child_process:430:5)
npm ERR! gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:442:5)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:518:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:292:12)
npm ERR! gyp ERR! stack     at onErrorNT (node:internal/child_process:484:16)
npm ERR! gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\michael\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\michael\AppData\Roaming\npm\node_modules\homebridge-config-ui-x\node_modules\node-pty-prebuilt-multiarch
npm ERR! gyp ERR! node -v v20.11.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\michael\AppData\Local\npm-cache\_logs\2024-02-04T02_38_21_242Z-debug.log
Error: Command failed: npm rebuild --unsafe-perm
× ERROR: Failed Operation

C:\Windows\System32>npm install -g npm@10.4.0

removed 231 packages, changed 24 packages, and audited 30 packages in 10s

2 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities







C:\Windows\System32>hb-service rebuild
i Rebuilding for Node.js v20.11.0...
npm ERR! code 1
npm ERR! path C:\Users\michael\AppData\Roaming\npm\node_modules\homebridge-config-ui-x\node_modules\node-pty-prebuilt-multiarch
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/check-prebuild.js || prebuild-install || node scripts/install.js
npm ERR! Prebuild binary missing for platform.
npm ERR! prebuild-install WARN install No prebuilt binaries found (target=20.11.0 runtime=node arch=x64 libc= platform=win32)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@20.11.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.12.1 found at "C:\Program Files\Python312\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v20.11.0/node-v20.11.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v20.11.0/node-v20.11.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v20.11.0/SHASUMS256.txt
npm ERR! gyp http GET https://nodejs.org/download/release/v20.11.0/win-x64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v20.11.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v20.11.0/win-x64/node.lib
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS not looking for VS2015 as it is only supported up to Node.js 18
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\michael\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:113:11)
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio (C:\Users\michael\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:69:17)
npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR! gyp ERR! stack at async createBuildDir (C:\Users\michael\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:69:26)
npm ERR! gyp ERR! stack at async run (C:\Users\michael\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js:81:18)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\michael\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\michael\AppData\Roaming\npm\node_modules\homebridge-config-ui-x\node_modules\node-pty-prebuilt-multiarch
npm ERR! gyp ERR! node -v v20.11.0
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: C:\Users\michael\AppData\Local\npm-cache\_logs\2024-02-04T20_24_38_927Z-debug-0.log
Error: Command failed: npm rebuild --unsafe-perm
× ERROR: Failed Operation

C:\Windows\System32>npm install --global windows-build-tools
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated windows-build-tools@5.2.2: Node.js now includes build tools for Windows. You probably no longer need this tool. See https://github.com/felixrieseberg/windows-build-tools for details.
npm ERR! code 1
npm ERR! path C:\Users\michael\AppData\Roaming\npm\node_modules\windows-build-tools
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node ./dist/index.js
npm ERR! Downloading python-2.7.15.amd64.msi
npm ERR! [>                                            ] 0.0% (0 B/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [>                                            ] 0.0% of 20.2 MB (0 B/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [=>                                           ] 5.4% of 20.2 MB (1.1 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [=====>                                       ] 13.7% of 20.2 MB (2.77 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [========>                                    ] 21.5% of 20.2 MB (3.49 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [============>                                ] 30.7% of 20.2 MB (4.15 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [================>                            ] 38.9% of 20.2 MB (4.5 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [===================>                         ] 46.2% of 20.2 MB (4.68 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [=======================>                     ] 53.6% of 20.2 MB (4.82 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [==========================>                  ] 60.8% of 20.2 MB (4.92 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [=============================>               ] 68.1% of 20.2 MB (5.01 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [=================================>           ] 76.2% of 20.2 MB (5.14 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [=====================================>       ] 85.0% of 20.2 MB (5.3 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [=========================================>   ] 93.9% of 20.2 MB (5.43 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [============================================>] 100.0% of 20.2 MB (5.4 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [============================================>] 100.0% of 20.2 MB (5.4 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading python-2.7.15.amd64.msi
npm ERR! [============================================>] 100.0% of 20.2 MB (5.4 MB/s)
npm ERR! Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\michael\.windows-build-tools\python-2.7.15.amd64.msi.
npm ERR!
npm ERR!
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading vs_BuildTools.exe
npm ERR! [>                                            ] 0.0% (0 B/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading vs_BuildTools.exe
npm ERR! [>                                            ] 0.0% of 1.12 MB (0 B/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading vs_BuildTools.exe
npm ERR! [============================================>] 100.0% of 1.12 MB (1.12 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading vs_BuildTools.exe
npm ERR! [============================================>] 100.0% of 1.12 MB (1.12 MB/s)
npm ERR! ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading vs_BuildTools.exe
npm ERR! [============================================>] 100.0% of 1.12 MB (1.12 MB/s)
npm ERR! Downloaded vs_BuildTools.exe. Saved to C:\Users\michael\.windows-build-tools\vs_BuildTools.exe.
npm ERR!
npm ERR! Starting installation...
npm ERR! Downloading installers failed. Error: TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor
npm ERR!     at Function.defineProperty (<anonymous>)
npm ERR!     at Object.removePath (C:\Users\michael\AppData\Roaming\npm\node_modules\windows-build-tools\dist\utils\remove-path.js:11:12)
npm ERR!     at Object.install (C:\Users\michael\AppData\Roaming\npm\node_modules\windows-build-tools\dist\install\index.js:29:19)
npm ERR!     at C:\Users\michael\AppData\Roaming\npm\node_modules\windows-build-tools\dist\start.js:17:19
npm ERR!     at Object.download (C:\Users\michael\AppData\Roaming\npm\node_modules\windows-build-tools\dist\download.js:35:5)
npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR!     at async Object.aquireInstallers (C:\Users\michael\AppData\Roaming\npm\node_modules\windows-build-tools\dist\aquire-installers.js:32:13) {
npm ERR!   code: 'ERR_INVALID_OBJECT_DEFINE_PROPERTY'
npm ERR! }
npm ERR! windows-build-tools will now exit.

npm ERR! A complete log of this run can be found in: C:\Users\michael\AppData\Local\npm-cache\_logs\2024-02-04T20_27_51_081Z-debug-0.log

C:\Windows\System32>

Configuration

-

Environment

  • OS: Windows 10
  • Software:
  • Node: 20.11.0
  • npm: 10.4.0

Process Supervisor

hb-service

Additional Context

No response

The pre builds are part of the homebridge-config-ui-x package, have you updated to the latest ?

Thanks for helping me out. I'm trying to update from 4.50.1 but as far as I could tell, I needed to update node.js first.

Can I simply use this to update to the latest Homebridge version now?
npm install -g --unsafe-perm homebridge homebridge-config-ui-x

edit: I ran this:
npm update -g homebridge homebridge-config-ui-x
and it appears to have worked! I could run hb-service rebuild and then hb-service start and my Homebridge appears to be running happily again.

It seems there is a hole in the docs, perhaps because new users are being directed to use Hyper-V now? Anyhow, thanks for pointing me in the right direction.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been closed as no further activity has occurred.