How to cross-compile Node-RED for an embedded system

Hi everyone,

I have a question about cross-compiling Node-Red for an embedded device.
The device is an SBC with a Touchpanel, Cortex A9 (i.MX6) processor and a Linux yocto custom build by the manufacturer.

Now I want to get Node-Red running on the embedded device, ideally without building my own yocto.
The manufacturer included:

  • a script to install Node.js (with npm) which has worked
  • an SDK for cross-compiling, which I have installed on an Ubuntu 16.04 build host, worked fine so far.
    I managed to cross-compile and then run git on the embedded device (not sure if I acutally need that...) and installed grunt via npm (on the device).

Lacking some experience with npm and grunt, I am not sure how to go on with cross-compiling Node-Red from source, as it seems quite different from the tools I have been using so far (./configure and make). I didn't find any fitting results yet.

Any tips or suggestions on how to proceed?

Kind regards
Lukas

as long as the version of node.js installed is a recent version and includes npm - then you should just be able to install Node-RED using npm using the default instructions - https://nodered.org/docs/getting-started/local - as long as there is enough storage space on your device. No need to compile anything by default for the core of Node-RED. You may get some warnings about optional dependencies but they are optional...

Thank you for the quick response!
I guess I assumed there would not be a prebuilt version for my hardware. The device has Node.js v8.11.3 and the Node-RED installation via npm worked! With some errors concerning bcrypt, which was then discarded as optional dependency as you predicted.
So much easier than I thought :slight_smile:

ooooh - though node 8 is beyond end of life support - so no security patches or fixes. The latest node 8 is 8.17 - so if at all possible try to get to that. I know there are some nodes (eg like node-red-dashboard) that may not work on 8.11 - so fingers crossed.
(I think the base is OK but ...)