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

Cannot use with Node 10 #19

Closed
C-D-Lewis opened this issue Dec 28, 2019 · 5 comments
Closed

Cannot use with Node 10 #19

C-D-Lewis opened this issue Dec 28, 2019 · 5 comments

Comments

@C-D-Lewis
Copy link
Contributor

C-D-Lewis commented Dec 28, 2019

Upgrading my apps to Node 10, I found I can no longer use this above node 8. When building wiringPi:

../src/addon.h:45:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
       target->ForceSet(v8::String::NewFromUtf8(isolate, #name, v8::String::kInternalizedString), \
               ^~~~~~~~
../src/wiringPi.cc:886:3: note: in expansion of macro ‘EXPORT_CONSTANT_INT’
   EXPORT_CONSTANT_INT(FSEL_ALT5);
   ^~~~~~~~~~~~~~~~~~~
make: *** [WiringPi.target.mk:122: Release/obj.target/WiringPi/src/wiringPi.o] Error 1
make: Leaving directory '/home/pi/node-microservices/node-common/node_modules/wiringpi-node/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:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.19.75+
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/pi/node-microservices/node-common/node_modules/wiringpi-node
gyp ERR! node -v v10.13.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok

I found a related issue: WiringPi/WiringPi-Node#95

The upshot appears to be that the wiringpi-node npm module just isn't maintained anymore.

However, this newer package could be a possible alternative, as it is based on the old library: https://www.npmjs.com/package/node-wiring-pi

@gamosoft
Copy link

hi there, same issue here, were you able to figure it out?

thanks in advance

@C-D-Lewis
Copy link
Contributor Author

Not yet (lack of time) but my options are:

  1. Fix the bug relating to the WiringPi dependency
  2. Rollback to node 8 in my apps (it's unsupported and lacks needed language features)
  3. Creating/adopting a new blinkt node driver package.

@C-D-Lewis
Copy link
Contributor Author

I found that replacing wiringpi-node (doesn't build on node 10) with node-wiring-pi allows me to use blinkt! again. Will make a PR.

@Irrelon
Copy link
Owner

Irrelon commented Mar 17, 2020

Merged and also updated the code. Thanks for all your help to maintain this project, you rock!

@Irrelon Irrelon closed this as completed Mar 17, 2020
@gamosoft
Copy link

Thanks for this!!! If you're so kind, could you please add some steps on how to set it up? I have a rpi4 with latest raspbian and getting a lot of errors still. Got the source from here with:

npm install git+https://[email protected]/Irrelon/node-blinkt.git

this throws a LOT of warnings but seems to go on. from here, a myriad of errors that get fixed by adding a new babel runtime dependency, node-gyp etc...

could you please share some steps on how to set this up to finally flash the blinkt from node (i'm currently on 10.15.2 on the pi)?

also, maybe sharing the package.json if you don't mind?

thanks a lot!!!

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

3 participants