Open michaelgambold opened 8 months ago
RPIO can only be downloaded on the raspberry pi. If you wish to develop with your mac, you may npm install @types/rpio.
@hoang-danny05 I tried this to see if it worked but didn't.
From the trace the issue is internal to Node 20 and how rpio interfaces with it (not something as simple as types).
Some other projects have reported this (see below links for discussions regarding this).
https://github.com/nodejs/nan/issues/942 https://github.com/nodejs/nan/pull/943
P.S. I have also updated to the latest Node 20 release through nvm (20.10.0) and this is still an issue.
Found this from an electron issue about the same. The underlying fix is released in nan version 2.17.0; However rpio is using 2.14.1 (https://github.com/jperkin/node-rpio/blob/52ae53875c3452622a0e3b5130c52f7b85a2099b/package.json#L15)
https://github.com/electron/electron/issues/35193#issuecomment-1273796411
The underlying fix is just to update the nan dependency. If I have time I might try and get a PR for this.
Deleting my lock file with a fresh node_modules install resolved rpio's nan version to 2.18.0
@pdillon Thanks for that I can confirm that this comment worked as a work around.
I still think the minimum version of the library should be updated and I've created PR #180 that includes this change. @jperkin if you would like to review this and push out a new version that would be great.
@jperkin this issue can be closed now regardless of if you choose to do anything with my PR. Just want to make sure you see this issues status before it goes from "open" issues.
I've been using this library with node 14, 16, 18 however when I have started the process of lifting my project to node 20 (the now LTS) I get the following errors when trying to install rpio.
Error message
Setup
Although this error is from my M1 macbook (with NVM) this also fails in GitHub Action CI.