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

homebridge-zigbee needs to be updated for Node v12 #52

Open
mrdc opened this issue Nov 23, 2019 · 27 comments
Open

homebridge-zigbee needs to be updated for Node v12 #52

mrdc opened this issue Nov 23, 2019 · 27 comments

Comments

@mrdc
Copy link

mrdc commented Nov 23, 2019

Hello,

Looks like homebridge-zigbee plugin needs to be updated for Nove v12, as it causes errors after installation on docker-homebridge with Node v12.
Details:
homebridge/docker-homebridge#250

@mrdc mrdc changed the title homebridge-zigbee needs to be update for Node v12 homebridge-zigbee needs to be updated for Node v12 Nov 23, 2019
@mkellsy
Copy link

mkellsy commented Nov 27, 2019

HOOBS runs on Node 12. I have a user that can't install the plugin. Here is the log output.

> [email protected] install /Users/mkellsy/.hoobs/node_modules/serialport
> prebuild-install || node-gyp rebuild
...
../src/serialport.cpp:460:43: error: expected ';' after top level declarator
  void init(v8::Handle<v8::Object> target) {
                                          ^
                                          ;
12 warnings and 9 errors generated.
make: *** [Release/obj.target/serialport/src/serialport.o] Error 1
gyp
 ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd ~/.hoobs/node_modules/serialport
gyp ERR!
 node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm
 WARN notsup Unsupported engine for [email protected]: wanted: {"node":"~0.10.0"} (current: {"node":"12.13.1","npm":"6.13.1"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"~0.10.0"} (current: {"node":"12.13.1","npm":"6.13.1"})
npm
WARN
 notsup Not compatible with your version of node/npm: [email protected]

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR!
 Exit status 1
npm
ERR!

npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm

ERR!
 A complete log of this run can be found in:
npm

ERR!
    ~/.npm/_logs/2019-11-27T17_10_20_764Z-debug.log

It looks like one of your deps is causing the issue [email protected]. There is a new version available 8.0.5, this seems to work in Node LTS.

@markus-fischbacher
Copy link

Upgrading serialport to 8.0.5 fixes the problem.
Would be nice, if the maintainer could do that for us.

@jonnycastaway
Copy link

I contacted the maintainer. He is a bit busy but will look at the problem next week. So i think he will contact us here 😉

@halilaykent
Copy link

I have the same problem too

@DiPa2211
Copy link

I have the same problem. Did you find any other solution besides waiting for fixed version?

I tried to upgrade to serialport 8.0.6. However, that did not solve the problem

I installed serialport 8.0.6 and got this messages:

pi@raspberrypi:~ $ sudo npm install serialport --unsafe-perm --build-from-source
[email protected] postinstall /home/pi/node_modules/serialport
node thank-you.js
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.
+ [email protected]
updated 1 package and audited 553 packages in 3.965s
found 0 vulnerabilities

Now I don't know whether it has been installed successfully? Can you give me any hints?

@markus-fischbacher
Copy link

I‘m still waiting for the update 😉

@mkellsy
Copy link

mkellsy commented Dec 26, 2019

You can downgrade Node to 10.17.0. It installs in this version.

@halilaykent
Copy link

@mkellsy But this time the homebridge config ui x wont work.

@jonnycastaway
Copy link

You can downgrade Node to 10.17.0. It installs in this version.

That‘s not a solution if you use systems like Hoobs or a ready to go homebridge image.

The only right way is to actualize the plugin.

@mkellsy
Copy link

mkellsy commented Dec 27, 2019

@mkellsy But this time the homebridge config ui x wont work.

UI-X runs in 10.17.0, you need to uninstall it then reinstall it after you change the Node version.

sudo npm uninstall -g homebridge-config-ui-x

Then

sudo npm install -g --unsafe-perm homebridge-config-ui-x

@mkellsy
Copy link

mkellsy commented Dec 27, 2019

That‘s not a solution if you use systems like Hoobs or a ready to go homebridge image.

The only right way is to actualize the plugin.

I make the HOOBS img file, and as of 3.1.9 we are using 10.17.0, because many plugins don't support Node 12 yet.

@markus-fischbacher
Copy link

For those, who installed Hoobs 3 with Node 12, what is the best way to downgrade?

@mkellsy
Copy link

mkellsy commented Dec 27, 2019

We have a script for that.

wget -q -O - https://raw.githubusercontent.com/hoobs-org/HOOBS/master/clean.sh | sudo bash -

@jonnycastaway
Copy link

Then i will test the downgrade after holidays.
Hope that all will work.

@markus-fischbacher
Copy link

markus-fischbacher commented Dec 27, 2019

@mkellsy the downgrade unfortunately broke my HOOBS installation. It's not booting anymore.
The cleanup script does not find npm.

main: line 66: npm: command not found
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
main: line 102: npm: command not found
main: line 103: npm: command not found
main: line 104: npm: command not found
Node  Installed
bash: line 188: npm: command not found
NPM Version 
Upgrading NPM
bash: line 195: npm: command not found
bash: line 196: npm: command not found
NPM  Installed
bash: line 206: npm: command not found
bash: line 207: npm: command not found

@mkellsy
Copy link

mkellsy commented Dec 27, 2019

Run it again. I added the -k flag to the curl command that downloads Node

@markus-fischbacher
Copy link

Thanks, it worked! :)

@halilaykent
Copy link

Yes, Finally managed to make it work. However, my bulb was not a supperted device :(
Unrecognized device: 0x00158d0002c65f0d LUMI lumi.light.aqcn02

@jonnycastaway
Copy link

So, one day before christmas the maintainer release a new npm plugin: zigbee v2
I installed it and all is working.
If anyone will test ;-)

@markus-fischbacher
Copy link

@jonnycastaway nice 👍🏻 Which Zigbee adapter do you use?

@mrdc
Copy link
Author

mrdc commented Jan 2, 2020

So, one day before christmas the maintainer release a new npm plugin: zigbee v2
I installed it and all is working.
If anyone will test ;-)

Is it updatable via Homebridge GUI? Or manual installation?

@iGranDav
Copy link

https://www.npmjs.com/package/homebridge-zigbee-v2 has the same error for me :(

@markus-fischbacher
Copy link

I switched to RaspBee and homebridge-hue in combination with HOOBS.
It's working perfectly.

@BobbySlope
Copy link

Issue still exists, look like the installation fails on serialport install script.

Tried on Node 12.14.1 and 10.17.0

/tmp/.node-gyp/12.14.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P*, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfoNan::ObjectWrap&)]’:
../../../../nan/nan_object_wrap.h:65:61: required from here
/tmp/.node-gyp/12.14.0/include/node/v8.h:10004:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfoNan::ObjectWrap::Callback’ {aka ‘void (
)(const v8::WeakCallbackInfoNan::ObjectWrap&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo&)’} [-Wcast-function-type]
make: *** [serialport.target.mk:110: Release/obj.target/serialport/src/serialport.o] Error 1
make: Leaving directory '/home/hoobs/.hoobs/node_modules/cc-znp/node_modules/serialport/build'
gyp ERR! build error
gyp ERR!
stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack
at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp
ERR! System Linux 4.19.58-v7+
gyp ERR!
command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/hoobs/.hoobs/node_modules/cc-znp/node_modules/serialport
gyp
ERR! node -v v12.14.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm
WARN notsup Unsupported engine for [email protected]: wanted: {"node":"~0.10.0"} (current: {"node":"12.14.0","npm":"6.13.6"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"~0.10.0"} (current: {"node":"12.14.0","npm":"6.13.6"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN
optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/node-aead-crypto):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node lib/install.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm
ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: prebuild-install || node-gyp rebuild
npm
ERR!
Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@BobbySlope
Copy link

[email protected] is way behind. latest release 8.0.6 atm
everything lower than 8.0.0 is no longer supported

@clipse2004
Copy link

Any News for this? I use hoobs and today I bought a Zigbee Stick to integrate my Aqara things. But first we need a working plugin :)

@manuchis
Copy link

manuchis commented Jun 7, 2020

I updated serialport to v9.0.0 and still getting the same error.

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

10 participants