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

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

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

devtool add "npm://;name=firebase;version=5.9.2"

I needed to add

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:

> 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

On the target system,
does contain node-v57-linux-arm-glibc

Any ideas on what I could try?



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,

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

1 Like

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

Thanks, I posted a message.