Community
cancel
Showing results for 
Search instead for 
Did you mean: 
1,437 Views

mraa library error after updating to node 0.12.5

I'm using node.js on Edison. I updated node.js to 0.12.5 version with this instruction:

I let the 'make' command run over night then found my laptop sleeping, but the Edison board was still turned on. Then I ran 'make install' without any error.

However, the upgrade, including mraa library shows the error below. Why does this happen and what should I do to get mraa included successfully?

root@Eddie:~/AIRDispenser# node --version

v0.12.5

root@Eddie:~/AIRDispenser# node

> var mraa = require('mraa')

Error: Module did not self-register.

at Error (native)

at Module.load (module.js:355:32)

at Function.Module._load (module.js:310:12)

at Module.require (module.js:365:17)

at require (module.js:384:17)

at repl:1:12

at REPLServer.defaultEval (repl.js:132:27)

at bound (domain.js:254:14)

at REPLServer.runBound [as eval] (domain.js:267:12)

at REPLServer. (repl.js:279:12)

Tags (1)
6 Replies
Pablo_M_Intel
Employee
56 Views

Hi ckanthap,

I've been doing some research and according to some other threads it's possible that you first have to compile mraa after compiling node. Another option would be that an older version of node is still present on the board and is being chosen instead of the node 0.12.5. And one last possibility is that mraa requires an npm-gyp rebuild, as it's specified in this thread /thread/93530 https://communities.intel.com/thread/93530.

Regards,

PabloM_Intel

Matthias_H_Intel
Employee
56 Views

By now I have heard about 2 success stories with 0.12.5 and mraa. I myself also ran into issues. Maybe someone could post the steps to have 0.12.5 and mraa working together.

That said Node 4.x, and 5.x seem to work easier together with mraa.

Might make more sense to move to there?

56 Views

How do you locate where mraa is in order to recompile it? and to recompile I just have to run the make command right?

 

Pablo_M_Intel
Employee
56 Views

Hi ckanthap,

Yes in order to recompile it you'll just need to run the make command, for that you can follow the instructions from here: /thread/57152 https://communities.intel.com/thread/57152.

About your first question, let us investigate this and we'll get back to you soon.

Regards,

PabloM_Intel

Pablo_M_Intel
Employee
56 Views

Hi ckanthap,

How did you compile libmraa in the beginning? Did you do it from source or using opkg? Also, I would suggest you to take a look at this thread /thread/85919 https://communities.intel.com/thread/85919.

Regards,

PabloM_Intel

MCara4
New Contributor III
56 Views

Hi ckanthap,

I was able to use mraa using node 0.12.7 (installed by the AlexT repository). The trick is to add to the to the dependencies section of package.json file this line:

...

"dependencies": {

...,

"mraa": "0.8.0",

...

}

It is important to use the 0.8.0 because latest version 0.8.1 doesn't work. I hope this workaround can work also on node 0.12.5.

I'd like Intel will release a new image with node 0.12 preinstalled.

Reply