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

No MRAA dependency #10

Closed
zzarbi opened this issue Jan 2, 2015 · 8 comments
Closed

No MRAA dependency #10

zzarbi opened this issue Jan 2, 2015 · 8 comments

Comments

@zzarbi
Copy link

zzarbi commented Jan 2, 2015

If I install this module "npm install cylon-intel-iot" it does not install the module "mraa" and when trying to run a Cylon App I get "Cannot find the 'cylon-intel-iot' module."
If I manually install mraa "npm install mraa" then it works fine.

@edgarsilva
Copy link
Contributor

@zzarbi Just tried the latest release and seems to be working, can you pls try removing the mraa and cylon-intel-iot then try to reinstall.

@zzarbi
Copy link
Author

zzarbi commented Jan 2, 2015

I re-flash the Board entirely without keeping any of the previous data.
This time the /usr/lib/node_modules/mraa folder was there by default and Cylon works without the previous error.
However if I move that folder "/usr/lib/node_modules/mraa" then running a Cylon app I get "Cannot find the 'cylon-intel-iot' module." and re-instaling cylon-intel-iot:

root@edison:~/clapper# npm install cylon-intel-iot
npm WARN package.json clapper@0.0.1 No description
npm WARN package.json clapper@0.0.1 No repository field.
npm WARN package.json clapper@0.0.1 No README data
npm http GET https://registry.npmjs.org/cylon-intel-iot
npm http 304 https://registry.npmjs.org/cylon-intel-iot
cylon-intel-iot@0.4.0 node_modules/cylon-intel-iot

doesn't install the mraa module.
Does this mean I have to put "mraa" as a dependency in my package.json?

@stewart
Copy link
Contributor

stewart commented Feb 5, 2015

Hi @zzarbi - we don't bundle MRAA by default for a few reasons, but mainly because installing MRAA is not a one-step process.

Since we can't be certain users will look at the README or website before installing, perhaps a better solution is a post-install message, to indicate to them that MRAA must be installed?

@zzarbi
Copy link
Author

zzarbi commented Feb 5, 2015

A message would be nice.

@Tomas0413
Copy link

Hello, I'm facing an issue which is related to this discussion.

I have Intel Edison with ubilinux on it. I followed the process of installing MRAA described here:
https://learn.sparkfun.com/tutorials/installing-libmraa-on-ubilinux-for-edison

I have a python script which works fine with MRAA, but when I try Cylon, I get this error:

# node blinkm.js
I, [2015-02-16T23:29:47.837Z]  INFO -- : Initializing connections.
Cannot find the 'cylon-intel-iot' module.
This problem might be fixed by installing it with 'npm install cylon-intel-iot' and trying again.

# npm install cylon-intel-iot
cylon-intel-iot@0.5.0 node_modules/cylon-intel-iot

# node blinkm.js
I, [2015-02-16T23:30:09.759Z]  INFO -- : Initializing connections.
Cannot find the 'cylon-intel-iot' module.
This problem might be fixed by installing it with 'npm install cylon-intel-iot' and trying again.

# cat blinkm.js 
var Cylon = require('cylon');

Cylon.robot({
  connections: {
    edison: { adaptor: 'intel-iot' }
  },

  devices: [
    { name: 'blinkm', driver: 'blinkm' }
  ],

  work: function(my) {
    my.blinkm.stopScript();
    my.blinkm.goToRGB(255, 0, 0);
  }
}).start();

Any ideas how to get this working?

@edgarsilva
Copy link
Contributor

This is probably because of older version of MRAA or something wron with install or config. Could you pls follow the steps here:

https://github.com/intel-iot-devkit/mraa#installing-on-your-board

and install/update and let us know how it goes.

@Tomas0413
Copy link

Thanks, I got the problem resolved now.

I don't use opkg, so I manually extracted the files:

wget http://iotdk.intel.com/repos/1.1/intelgalactic/libmraa0_0.6.0_i586.ipk
ar -x libmraa0_0.6.0_i586.ipk 
mv data.tar.gz /
cd /
tar xvfz data.tar.gz 
rm data.tar.gz 

@edgarsilva
Copy link
Contributor

Nice to hear, looks like this is solved, closing this issue.

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

No branches or pull requests

4 participants