estherjk / edison-arduino101-iot

Edison + Arduino 101 IoT demo
https://youtu.be/NRZZRsqJQWY
MIT License
10 stars 5 forks source link

Have difficulties to run #1

Closed tom6870 closed 8 years ago

tom6870 commented 8 years ago

Hello,

This is a very good example for using bluetooth with intel Edison and Curie. I followed the steps and have some difficulties to run "node sensor.js". I got the following errors:

root@edison:~/edison-arduino101/edison# node sensors.js _module.js:338 throw err; ^ Error: Cannot find module '../build/Release/binding.node' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at Object. (/home/root/edison-arduino101/edison/node_modules/noble/node_modules/bluetooth-hci-socket/lib/native.js:3:15) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) _ I though it was due to node.js version issue (image from intel was version 0.10.38-r0). So I upgraded the node.js to latest version:

root@edison:~/edison-arduino101/edison# opkg list nodejs nodejs - 0.12.7-r1 - nodejs version 0.12.7-r1 nodeJS Evented I/O for V8 JavaScript

But still got the same error. It turns this error happens at the first line of sensor.js: var noble = require('noble');

I tried to remove all the node_modules under /edison, and reinstall all modules by "npm install". It doesn't help.

Here are the modules versions installed: root@edison:~/edison-arduino101/edison# npm -v noble 1.4.28 root@edison:~/edison-arduino101/edison# npm -v socket.io-client 1.4.28 root@edison:~/edison-arduino101/edison# npm -v bluetooth-hci-socket 1.4.28

I have stuck on this for one week, any help will be greatly appreciated.

Many thanks....

-Tom

estherjk commented 8 years ago

Hi Tom, sorry to hear you've been having issues. Can you double-check that you have systemd-dev installed via opkg and async installed globally using npm -g install async? Then, try removing your node_modules folder and re-installing.

tom6870 commented 8 years ago

Hi Kim,

Thank you very much for the quick response. I redo the whole procedure and this time everything works. I don't need to upgrade the node.js to the latest version. I might made a mistakes somewhere. After I strictly follow your writeup, everything works !

Many thanks again !!

estherjk commented 8 years ago

Awesome! Glad it's working now!

tom6870 commented 8 years ago

Hello Esther,

Your instructions are very helpful. I have followed it and finished most of the exercises !

My goal is to use one Edison module for receiving data from Curie module, and to server as a web server. Do you think if this is possible ? I am trying to figure out how to modify the codes... Any suggestions ?

Thanks a lot,

-Tom


From: Esther Jun Kim notifications@github.com Sent: Saturday, April 30, 2016 3:15 PM To: drejkim/edison-arduino101-iot Cc: tom6870; Author Subject: Re: [drejkim/edison-arduino101-iot] Have difficulties to run (#1)

Closed #1https://github.com/drejkim/edison-arduino101-iot/issues/1.

You are receiving this because you authored the thread. Reply to this email directly or view it on GitHubhttps://github.com/drejkim/edison-arduino101-iot/issues/1#event-646598437