I am attempting to use the node-hid module in Node v0.10.26 to read input from a USB gamepad on a Raspberry Pi 3 running Raspbian Jessie.
While I have been able to use this module on the Pi under certain circumstances (I believe it was in v8.0.0 - I am using nvm for version management), I am running into some issues using it with v0.10.26. I've only had luck with another module I want to use, openvg-canvas, on v0.10.26, which is why I'm currently trying to use the older version.
I have installed node-hid successfully, and I can run a test program using the module (it is able to list connected devices); when I try to connect to a device, however, it says it is unable to connect.
At an earlier time (I think under v8.0.0) I had this same issue and was able to resolve it by running with sudo. When I try that under v0.10.26, however, I receive a message saying "Error: Module did not self-register."
I saw this same message before when trying to use the openvg-canvas module in v8.0.0. I have seen npm rebuild
recommended as a solution, but this didn't fix it in my case.
I tried to npm install the node-hid module with sudo as well, but this crashed with what appears to be a build error: "No rule to make target ..."
I have a few questions as a result: - What exactly does this "self-register" error message mean? - Why might a module self-register when run without sudo but fail to do so with sudo? - Why might a module build successfully without sudo but fail with sudo?
Thank you in advance for any advice, answers, or suggestions, and if there is any way I can improve this question please let me know!
via Ornithorhynchidae
No comments:
Post a Comment