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

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...