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

Replace wiringpi-node with newer and node 10 compatible node-wiring-pi #20

Merged
merged 1 commit into from
Mar 17, 2020

Conversation

C-D-Lewis
Copy link
Contributor

@C-D-Lewis C-D-Lewis commented Mar 16, 2020

This allows me to install node-blinkt and set LEDs on Blink! phat using Node 10.

Relates to #19

Note: @Irrelon I cannot build a new file for dist on my Macbook, so you'll have to do this 😛

@Irrelon Irrelon merged commit 1ef75c0 into Irrelon:master Mar 17, 2020
@Irrelon
Copy link
Owner

Irrelon commented Mar 17, 2020

Wonderful, thanks @C-D-Lewis :)

@Irrelon
Copy link
Owner

Irrelon commented Mar 17, 2020

Looks like the build step was introduced by someone wanting to use ES6 and maintain compat with older versions of Node that don't support ES6... problem is we cannot build it now unless we run on debian because WiringPi requires debian...

I also use a proper computer so cannot build on my MacBook either... I could spin up a debian VM but that seems like overkill.

I think the solution is to just pull babel completely and require Node 10.3.0 as per https://node.green/

Even Node 6.x supported what we are barely using in ES6 (only const?).

@Irrelon
Copy link
Owner

Irrelon commented Mar 17, 2020

OK I've pushed a new version. I found a way to make the build work on MacBooks so we can all build normally again! I've refactored the code to fully ES6 as well. Can someone test for me? I'm not near a Pi with the Blinkt! at the moment!!!

@C-D-Lewis
Copy link
Contributor Author

@Irrelon I will test the new version soon, hopefully tonight.

@C-D-Lewis
Copy link
Contributor Author

It works! I had to also install @babel/runtime (perhaps that should be part of the package then @Irrelon?), but apart from that the new published version 1.2.0 is okay for node 10.

@C-D-Lewis C-D-Lewis deleted the update-dep branch March 17, 2020 22:29
@Irrelon
Copy link
Owner

Irrelon commented Mar 17, 2020

Thanks @C-D-Lewis I will add it to the dependencies in package and push now...

Irrelon added a commit that referenced this pull request Mar 17, 2020
@Irrelon
Copy link
Owner

Irrelon commented Mar 17, 2020

Done, and also published to npm :)

Seriously thanks for investigating and helping with the project. Great community!

@C-D-Lewis
Copy link
Contributor Author

Thanks! I came across this package when the previous one I was using (name now forgotten) stopped working, so I'm quite keen not to have that happen again if it can be helped...

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

Successfully merging this pull request may close these issues.

2 participants