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

**URL:** <https://forums.balena.io/t/resin-intel-edison-node-mraa-module-did-not-self-register/1258>\
**Category:** Product support\
**Created:** [June 17, 2017, 3:21pm UTC](https://forums.balena.io/t/resin-intel-edison-node-mraa-module-did-not-self-register/1258 "2017-06-17T15:21:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeff](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jeff/32/455_2.png) [@jeff](https://forums.balena.io/u/jeff)\
**Post date:** [June 17, 2017, 3:21pm UTC](https://forums.balena.io/t/resin-intel-edison-node-mraa-module-did-not-self-register/1258/1 "2017-06-17T15:21:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![imrehg](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/imrehg/32/36_2.png) [@imrehg](https://forums.balena.io/u/imrehg)\
**Post date:** [June 18, 2017, 9:56pm UTC](https://forums.balena.io/t/resin-intel-edison-node-mraa-module-did-not-self-register/1258/3 "2017-06-18T21:56:42Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![nghiant2710](https://avatars.discourse-cdn.com/v4/letter/n/90db22/32.png) [@nghiant2710](https://forums.balena.io/u/nghiant2710)\
**Post date:** [June 20, 2017, 8:05am UTC](https://forums.balena.io/t/resin-intel-edison-node-mraa-module-did-not-self-register/1258/4 "2017-06-20T08:05:30Z")

</div>

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

```auto
docker run -ti --rm --entrypoint bash resin/intel-edison-node:6.10.2
root@22cf2694d70a:/# env
NODE_VERSION=6.10.2
HOSTNAME=22cf2694d70a
UPM_VERSION=1.0.2
TERM=xterm
UPM_COMMIT=cde747439f7ada792509dd2b56075d4744ac15e4
LC_ALL=C.UTF-8
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/
MRAA_VERSION=1.5.1
SHLVL=1
HOME=/root
MRAA_COMMIT=6f9b470d8d25e2c8ba1586cd9d707b870ab30010
DEBIAN_FRONTEND=noninteractive
container=docker
_=/usr/bin/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
undefined

```

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 ([https://github.com/intel-iot-devkit/mraa/#installing-for-nodejs-only](https://github.com/intel-iot-devkit/mraa/#installing-for-nodejs-only)).

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?

---

<div class="post-metadata">

**Author:** ![jeff](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jeff/32/455_2.png) [@jeff](https://forums.balena.io/u/jeff)\
**Post date:** [June 26, 2017, 11:46am UTC](https://forums.balena.io/t/resin-intel-edison-node-mraa-module-did-not-self-register/1258/5 "2017-06-26T11:46:46Z")

</div>

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.
