enocean-js / nrce-deprecated

depricated
MIT License
2 stars 2 forks source link

Syntax error in node-red-log #7

Closed Rolf-M closed 6 years ago

Rolf-M commented 7 years ago

Hello, I've installed the nodes on a raspberry with node-red version 0.17.5 and node-js 6.11.2 I have a USB Stick connected and see the device in /dev folder when I add the node to a flow, I get the following errors from node-red

There seems to be something wrong... Regards, Rolf

Holger-Will commented 7 years ago

yes, you will need node >7.6 as this module uses async await.

nabbl commented 7 years ago

This is because of your NodeJS version.

My Nodes only work with NodeJS >=7.6.0. I have a dependency on node-enocean library.

You can also look at this issue: #29

For now the only solution is to upgrade your nodejs version

@Holger-Will You beat me for like a second or so :(

Holger-Will commented 7 years ago

https://github.com/node-enocean/node-red-contrib-enocean/issues/8

Rolf-M commented 7 years ago

Ok, I've got this... So now I've upgraded to node-js 8.6 and there is an error about the serialport

[serialport] Error: The module '/usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/build/Release/serialport.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 48. This version of Node.js requires NODE_MODULE_VERSION 57. Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install).

There seems something about versions again, it looks like the actual Version of serialport is 5 but node-enocean requires version 4. Could someone give me a hint how to fix this. Regards, Rolf

Holger-Will commented 7 years ago

have you tried npm rebuild ? if that does not work delete your node_modules folder and just npm installagain...

Rolf-M commented 6 years ago

Hello Holger, Yes, tried to do npm rebuild with and without „from sources“ options. I‘ve Seen there was an isssue on Node-enocean, about the version of the underlaying serialport interface. I can‘t find it any more. Maybe it‘s the best way to reinstall contrib-enocean. Keep you updated. Regards Rolf

Rolf-M commented 6 years ago

Ok, little update on this... found it. "node-red-node-serialport" was installed in the /usr/lib/node-modules directory, because of a reason I don't know. since node-enocean is installed in /home/pi/.node-red/node-modules and did install a version of serialport there, everything got a little messed up and caused the warnings above. I've cleaned up a lot and now there is no more warning. But it would be nice if node-enocean would support serialport 6.0.0 or later, as node-red-node-serialport will be updating as well. Regards, Rolf