Resin/intel-edison-node + MRAA, Module did not self-register

Hello, I am running a node app on an Intel Edison with the base image resin/intel-edison-node:6.10.2. When requiring mraa from the node app (e.g. var mraa = require(‘mraa’); ), I am getting the following message:

error Error: Module did not self-register.
at Error (native)
at Object.Module._extensions…node (module.js:597:18)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)

I have tried npm rebuild and receive the same message.

When using resin/intel-edison-node:latest, the container will not compile as another package I am using (jsupm_i2clcd) throws this error.

Error: Cannot find module ‘mraa’
e[34m[Build] e[39m at Function.Module._resolveFilename (module.js:485:15)
e[34m[Build] e[39m at Function.resolve (internal/module.js:18:19)
e[34m[Build] e[39m at [eval]:1:33
e[34m[Build] e[39m at ContextifyScript.Script.runInThisContext (vm.js:44:33)
e[34m[Build] e[39m at Object.runInThisContext (vm.js:116:38)
e[34m[Build] e[39m at Object. ([eval]-wrapper:6:22)
e[34m[Build] e[39m at Module._compile (module.js:569:30)
e[34m[Build] e[39m at evalScript (bootstrap_node.js:432:27)
e[34m[Build] e[39m at startup (bootstrap_node.js:139:9)
e[34m[Build] e[39m at bootstrap_node.js:575:3
e[34m[Build] e[39m gyp: Call to ‘node -p -e “require(‘path’).dirname(require.resolve(‘mraa’))”’ returned exit status 1 while in binding.gyp. while trying to load binding.gyp

Has anyone experienced this? Any suggestions for resolution or point me in the right direction?

This does not sound good, seems like some issue with the Edison base in question. Will be passing this on to the team, and get back to you with more info!

1 Like

Hi @jeff,

I’ve tried to reproduce your issue, however I’m able to load the mraa lib with resin/intel-edison-node:6.10.2 image

docker run -ti --rm --entrypoint bash resin/intel-edison-node:6.10.2
root@22cf2694d70a:/# env
root@22cf2694d70a:/# node
> var abc = require('mraa');
libmraa[7]: libmraa version v1.5.1 initialised by user 'root' with EUID 0
libmraa[7]: Platform not supported, not initialising
libmraa[7]: libmraa initialised for platform 'Unknown platform' of type 98

About the latest image, it’s node 7.x and mraa is not installed in that image by default since mraa doesn’t support node 7.x yet (

Can you please change your base image to the latest one resin/intel-edison-node:6 (node v6.10.3 and mraa v1.7.0) to check if the issue still persists or please send us your Dockerfile?

1 Like

Things are working great after changing to intel-edison-node:6.10.2. MRAA was installed, but UPM wasn’t. I installed the specific UPM modules I needed and its working great.

Thank you.