# Anyone know what to do if an NPM recipe builds a binary for the wrong system?

**URL:** <https://hub.mender.io/t/anyone-know-what-to-do-if-an-npm-recipe-builds-a-binary-for-the-wrong-system/442>\
**Category:** General Discussions\
**Created:** [April 2, 2019, 6:35pm UTC](https://hub.mender.io/t/anyone-know-what-to-do-if-an-npm-recipe-builds-a-binary-for-the-wrong-system/442 "2019-04-02T18:35:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrew\_wilcox](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/andrew_wilcox/32/165_2.png) [@andrew\_wilcox](https://hub.mender.io/u/andrew_wilcox)\
**Post date:** [April 2, 2019, 6:35pm UTC](https://hub.mender.io/t/anyone-know-what-to-do-if-an-npm-recipe-builds-a-binary-for-the-wrong-system/442/1 "2019-04-02T18:35:50Z")

</div>

This isn’t directly Mender related, but it is blocking using Mender for our application so I thought I might ask if anyone had seen this before, or know where the best place would be to go for help…

I’m building the raspberrypi0-wifi image from meta-raspberrypi, using the instructions in [Raspberry Pi 0 Wifi](https://hub.mender.io/t/raspberry-pi-0-wifi/78)

I used devtool to generate an NPM recipe to install the firebase package:

```bash
devtool add "npm://registry.npmjs.org;name=firebase;version=5.9.2"

```

I needed to add

```auto
RDEPENDS_node-firebase_append = " bash"

```

to the recipe because an included utility was looking for the bash shell.

On the Raspberry Pi, when I require firebase in Node:

```auto
> require('firebase')
Error: Failed to load gRPC binary module because it was not installed
for the current system
Expected directory: node-v57-linux-arm-unknown
Found: [node-v57-linux-arm-glibc]
This problem can often be fixed by running "npm rebuild" on the current system
Original error: Cannot find module
'/usr/lib/node/firebase/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-unknown/grpc_node.node'

```

On the target system,  
`/usr/lib/node/firebase/node_modules/grpc/src/node/extension_binary`  
does contain `node-v57-linux-arm-glibc`

Any ideas on what I could try?

Thanks!

Andrew

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [April 2, 2019, 6:43pm UTC](https://hub.mender.io/t/anyone-know-what-to-do-if-an-npm-recipe-builds-a-binary-for-the-wrong-system/442/2 "2019-04-02T18:43:07Z")

</div>

Unfortunately I have not touched “npm” parts much in Yocto and do not have much to say here. Guessing here but might be that your firebase package does not have the appropriate DEPENDS/RDEPENDS, e.g

```
RDEPENDS_${PN} = "grpc"

```

I would also try the Yocto mailing list,

[https://lists.yoctoproject.org/listinfo/yocto](https://lists.yoctoproject.org/listinfo/yocto)

Where I would expect you to get better response to your question.

---

<div class="post-metadata">

**Author:** ![andrew\_wilcox](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/andrew_wilcox/32/165_2.png) [@andrew\_wilcox](https://hub.mender.io/u/andrew_wilcox)\
**Post date:** [April 2, 2019, 7:25pm UTC](https://hub.mender.io/t/anyone-know-what-to-do-if-an-npm-recipe-builds-a-binary-for-the-wrong-system/442/3 "2019-04-02T19:25:13Z")

</div>

> [@mirzak](#):
>
> RDEPENDS\_${PN} = “grpc”

Alas, adding grpc as an explicit dependency didn’t make a difference, it’s still looking for the wrong version at runtime.

> [@mirzak](#):
>
> I would also try the Yocto mailing list

Thanks, I posted a message.
