Are you using the latest version of Node.js?
Take a look on how you can upgrade it: this thread is for Galileo, but this is the link for the Edison: https://github.com/alext-mkrs/meta-alext-edison/tree/master/recipes-addfeatures/nodejs-latest.
I pointed at AlexT's repo and used okpg install to get to the latest version.
root@bilbo:~# opkg list | grep nodejs
nodejs-dbg - 0.10.32-r0 - nodejs version 0.10.32-r0 - Debugging files nodeJS Evented I/O for V8
nodejs-dev - 0.10.32-r0 - nodejs version 0.10.32-r0 - Development files nodeJS Evented I/O for V8
nodejs-doc - 0.10.32-r0 - nodejs version 0.10.32-r0 - Documentation files nodeJS Evented I/O for
Should the node executable have been updated? based on the datestamp it does not appear to have been updated when I ran the opkg intall
Okay. I got feedback from git hub that recompiling for the platform should solve the problem.
I'm not set up to build and it's going to take me a while to get to it. Is anyone building an NPM repo like AlexT's opkg repo?
What happened when you download the versions for npm as the website states. Do you obtain the same error?
Take a look at this website if you haven't
I found these other links related to the use of npm:
You could check which packages you don't have installed yet. https://github.com/pinion/Getting-Started-with-Edison-and-IoT
Let me know the outcome of this or if you already tried this.
I'm still stuck. I am running node 0.10.32, I have libusb-1.0.9 and libusb-1.0-dev, and the npm module usb v0.3.11.
The git hub issue ( Binding issue on Linux · Issue #37 · nonolith/node-usb · GitHub ) indicated that recompiling on the platform might fix the problem. I've recompiled node, libusb, and the node usb package on my edison. I still get the same problem. I also don't see anything in the make steps that would cause having them compiled on the same machine to "fix" the problem.
I did not play with npm-versions yet. Are you suggesting I would use this to install the usb module? or node itself?
Okay I updated to node v0.10.33, and I removed and reinstalled usb with "npm install usb" to make sure it was recompiled with the latest stuff.
Still the same problem.
in the node_module/usb/build directory the config.gypi has the "host_arch": "ia32". I think that should be correct for edison.
I don't know enough about the build environment to trace through and see if anything is being pointed to incorrectly.
Sorry for late response. Any updates in this? New results? I have tried to find something useful for you, and the only thing that I found is to have a usb module and node.js version compatible between each other.
If you are still having problems... Before, you said that you installed node.js from AlexT repo. Did you installed libusb from there too?. Try again with those repositories and opkg update, opkg upgrade and after that please attach a screenshot of the error when trying to use libusb.
looks like the USB node package was just updated. I tried to install with "npm install usb" but it doesn't compile. The installation instructions (node-usb/Readme.md at master · nonolith/node-usb · GitHub)
indicate I should first install libudev-dev. This is not included in the AlexT's repo.
When I do the install without the compile fails with "libudev.h no such file or folder".
edit: found the missign libudev.h file in the systemd-dev opkg
This issue is now resolved with the latest node-usb release.