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

Versions higher than 4.51.2 fail to install on macOS #2220

Open
melgu opened this issue Oct 28, 2024 · 6 comments
Open

Versions higher than 4.51.2 fail to install on macOS #2220

melgu opened this issue Oct 28, 2024 · 6 comments
Labels

Comments

@melgu
Copy link

melgu commented Oct 28, 2024

Describe The Bug

I cannot install any version higher than 4.51.2 on macOS.

Just installing homebridge-config-ui-x without providing a version installs version 4.50.6.

I have the latest version of Homebridge installed (1.8.5).

Is this caused by not officially supported node version 23?

Logs

sudo npm install -g --unsafe-perm homebridge-config-ui-x@4.52.0
(node:43963) ExperimentalWarning: CommonJS module /opt/homebrew/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /opt/homebrew/lib/node_modules/npm/node_modules/supports-color/index.js using require().
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 warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'homebridge-config-ui-x@4.52.0',
npm warn EBADENGINE   required: { node: '^18 || ^20', homebridge: '^1.6.0' },
npm warn EBADENGINE   current: { node: 'v23.1.0', npm: '10.9.0' }
npm warn EBADENGINE }
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
npm warn deprecated fstream@1.0.12: This package is no longer supported.
npm error code 1
npm error path /opt/homebrew/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch
npm error command failed
npm error command sh -c node scripts/check-prebuild.js || prebuild-install --verbose || node scripts/install.js
npm error CXX(target) Release/obj.target/pty/src/unix/pty.o
npm error Prebuild binary missing for platform.
npm error prebuild-install info begin Prebuild-install version 7.1.2
npm error prebuild-install info looking for local prebuild @ prebuilds/node-pty-prebuilt-multiarch-v0.11.14-node-v131-darwin-arm64.tar.gz
npm error prebuild-install info looking for cached prebuild @ /Users/melvin/.npm/_prebuilds/6f19b1-node-pty-prebuilt-multiarch-v0.11.14-node-v131-darwin-arm64.tar.gz
npm error prebuild-install http request GET https://github.com/homebridge/node-pty-prebuilt-multiarch/releases/download/v0.11.14/node-pty-prebuilt-multiarch-v0.11.14-node-v131-darwin-arm64.tar.gz
npm error prebuild-install http 404 https://github.com/homebridge/node-pty-prebuilt-multiarch/releases/download/v0.11.14/node-pty-prebuilt-multiarch-v0.11.14-node-v131-darwin-arm64.tar.gz
npm error prebuild-install warn install No prebuilt binaries found (target=23.1.0 runtime=node arch=arm64 libc= platform=darwin)
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@10.2.0
npm error gyp info using node@23.1.0 | darwin | arm64
npm error gyp info find Python using Python version 3.13.0 found at "/opt/homebrew/opt/python@3.13/bin/python3.13"
npm error (node:44014) ExperimentalWarning: CommonJS module /opt/homebrew/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /opt/homebrew/lib/node_modules/npm/node_modules/supports-color/index.js using require().
npm error Support for loading ES Module in require() is an experimental feature and might change at any time
npm error (Use `node --trace-warnings ...` to show where the warning was created)
npm error gyp info spawn /opt/homebrew/opt/python@3.13/bin/python3.13
npm error gyp info spawn args [
npm error gyp info spawn args '/opt/homebrew/lib/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 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/opt/homebrew/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/Users/melvin/Library/Caches/node-gyp/23.1.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=/Users/melvin/Library/Caches/node-gyp/23.1.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/Users/melvin/Library/Caches/node-gyp/23.1.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/opt/homebrew/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error gyp info spawn make
npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm error In file included from ../src/unix/pty.cc:20:
npm error In file included from ../../../nan/nan.h:62:
npm error In file included from /Users/melvin/Library/Caches/node-gyp/23.1.0/include/node/node.h:73:
npm error In file included from /Users/melvin/Library/Caches/node-gyp/23.1.0/include/node/v8.h:23:
npm error In file included from /Users/melvin/Library/Caches/node-gyp/23.1.0/include/node/cppgc/common.h:8:
npm error /Users/melvin/Library/Caches/node-gyp/23.1.0/include/node/v8config.h:13:2: error: "C++20 or later required."
npm error    13 | #error "C++20 or later required."
npm error       |  ^
npm error ../src/unix/pty.cc:536:28: warning: missing field 'filter' initializer [-Wmissing-field-initializers]
npm error   536 |   struct kevent change = {0};
npm error       |                            ^
npm error ../src/unix/pty.cc:556:29: warning: missing field 'filter' initializer [-Wmissing-field-initializers]
npm error   556 |     struct kevent event = {0};
npm error       |                             ^
npm error 2 warnings and 1 error generated.
npm error make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
npm error gyp ERR! build error
npm error gyp ERR! stack Error: `make` failed with exit code: 2
npm error gyp ERR! stack at ChildProcess.<anonymous> (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:216:23)
npm error gyp ERR! System Darwin 24.1.0
npm error gyp ERR! command "/opt/homebrew/Cellar/node/23.1.0/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm error gyp ERR! cwd /opt/homebrew/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch
npm error gyp ERR! node -v v23.1.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: /Users/melvin/.npm/_logs/2024-10-28T17_27_45_896Z-debug-0.log

Config

No response

Homebridge UI Version

4.51.2

Homebridge Version

1.8.5

Node.js Version

v23.1.0

Operating System

macOS Sequoia 15.1

Environment Info

None

Raspberry Pi Model

None

@melgu melgu added the bug label Oct 28, 2024
@kemayo
Copy link

kemayo commented Nov 9, 2024

Also seeing this after brew update bumped me to node 23.

@0x5e
Copy link

0x5e commented Nov 11, 2024

+1

@donavanbecker
Copy link
Contributor

What version of macOS? Also has only brew install of node is not recommended and only even versions are supported by Homebridge.

@melgu
Copy link
Author

melgu commented Nov 11, 2024

macOS Sequoia 15.1

So I guess the node version is the issue then, right?

@grzegorz914
Copy link
Contributor

On my side was same problem after update node to 23.x, revert back to 22.x fixed all.

@NorthernMan54
Copy link
Contributor

Known issue, NodeJS 23 on MacOS will not build node-pty required for the UI

Am working on it here

https://github.com/homebridge/node-pty-prebuilt-multiarch/actions/workflows/Prepare%20prebuild%20environment.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants