jeancarl / node-red-contrib-tjbot

Node-RED nodes that can be used with the TJBot running on a Raspberry Pi.
6 stars 20 forks source link

Build errors with Node.js 10 #12

Open chunyianliew opened 5 years ago

chunyianliew commented 5 years ago

After installation of Node-Red using the instructions found here: https://nodered.org/docs/hardware/raspberrypi, the node version has been upgraded to 10.15.3. Based on the build errors it seems that this repository is not compatible with Node Version 10.

When I try to follow the installation steps provided with this repository, I am getting build errors at 'npm install'. Npm install fails to build the pigpio and rpi-ws281x-native node modules. I've attached the full install log to this issue. Unfortunately these build errors will render the servo and led useless.

It seems that the following error is one of the reasons for the failed build for both the pigpio and rpi-ws281x-native node modules: _../../nan/nan_maybe_43inl.h:88:15: error: 'class v8::Object' has no member named 'ForceSet'

There are 5 build errors for the rpi-ws281x-native node module all pointing to a missing function HasOwnProperty, the first error instance shows the following: ../src/rpi-ws281x.cc:100 :38: error: no matching function for call to 'v8::Object::HasOwnProperty(v8::Local&)'

install.log

Bumblebee156 commented 5 years ago

Hey @chunyianliew and @jeancarl, I'm also having this issue, unfortunately :(

Has either of you managed to solve it? If you have, I'd really appreciate if you could share the solution.

chunyianliew commented 5 years ago

Hi @Bumblebee156 ,

I managed to workaround this issue by downgrading node to version 9.11.2. I followed the instructions provided here: https://www.surrealcms.com/blog/how-to-upgrade-or-downgrade-nodejs-using-npm.html

By the way, I also discovered that the problem itself is inherited from the tjbot repository, so the issue needs to be fixed there.

Bumblebee156 commented 5 years ago

Hey @chunyianliew, Thank you for your response! Could you please go into more detail about how you solved the issue in the repository? Thanks again :)

chunyianliew commented 5 years ago

Hi @Bumblebee156,

What I meant was that I figured out that the build problems are inherited from the tjbot repository: https://github.com/ibmtjbot/tjbot (version 1.5.1) as defined in the package.json file of this project.

The build errors are caused by other dependencies defined in the package.json file of the tjbot project. Some of those dependencies seems to be not compatible with Node Version 10 yet. I have not dig into those version incompatibility issues to resolve them as the workaround by downgrading Node to Version 9 allowed me to build this project.