This lab reproduces in the terminal the guide to upgrade Node-RED 4.1 to 5.0 with Docker: we start from Node-RED 4.1.18 on Node.js 20, with the tag pinned in NR_TAG inside .env, and move to nodered/node-red:5.0.10, which ships Node.js 24. A third-party node with native code leaves every flow stopped with Flows stopped due to missing node types, and you fix it with npm rebuild inside /data and a restart.
Why Node-RED 5.0 stops the flows after upgrading
The change that breaks a Docker install is the Node.js version. The Node-RED 5.0 announcement explains that the official images are based on Node.js 24, and your /data volume keeps the node_modules you installed under Node.js 20. Every major Node.js release has an ABI number, which the Node.js ABI version registry sets at 115 for 20 and 137 for 24.
In the lab the affected node is node-red-contrib-speedtest. It depends on lzma-native, which keeps its binary in a folder named after that number: binding-v4.0.6-node-v115-linux-arm64. Node.js 24 looks for the node-v137 folder, does not find it and the speedtest type stays unregistered.
What the capture proves
Every step in the video really ran on an arm64 machine. The capture leaves five pieces of evidence:
- the log goes from
Node-RED version: v4.1.18on Node.js v20.20.2 tov5.0.10on Node.js v24.22.3 - 5.0.10 prints
Cannot find modulewith thenode-v137path andWaiting for missing types to be registered, andStarted flowsappears 0 times - the
/estadoendpoint, which does not use the broken node, goes from answeringflows runningto returning 404 - the runtime reports state
stopwith themissing-typeserror, whose text in the editor catalogue isFlows stopped due to missing node types. - after
npm rebuildand the restart thenode-v137folder appears, the log reachesStarted flowsand/estadoanswers again
Where the notice shows up if you do not open the editor
The text Flows stopped due to missing node types is a notice from the web editor and is not written to the container log. The lab is terminal-only, so it reads it from two places. The first is the /comms websocket, through which the runtime sends the editor the stop state and the list of missing types. The second is /locales/editor, the message catalogue that translates the missing-types key into that text.
On your server you do not need that much: look for Waiting for missing types to be registered in docker compose logs and query GET /nodes, which the Node-RED admin API documents. The broken module is listed there with its error, MODULE_NOT_FOUND in the lab.
The volume backup, with Node-RED stopped
The volume backup is what takes you back to 4.1 with the modules intact. The lab stops the service and archives /data with tar from a read-only alpine container, the same pattern as the Docker volume backup and restore lab. If you want to review what a named volume keeps, see the lab on how data persists in Docker with volumes and bind mounts.
The rollback is not recorded in this lab. The original guide tested it: restore the archive into the empty volume and pin NR_TAG=4.1.18-20, not 4.1, which according to the guide stopped at 4.1.12.
How the npm rebuild fix works
npm rebuild runs the install scripts of the already installed packages again. Inside the 5.0.10 container it uses Node.js 24, so lzma-native gets the ABI 137 binary. In the capture npm prints rebuilt dependencies successfully and warns about 1 package with scripts not approved in allowScripts.
The regular image ships what it takes to compile. According to the node-red-docker repository, the minimal variant does not include build tools, and the original guide documents that npm rebuild fails there with gyp ERR! find Python.
What this lab does not cover
The guide also tests 12 third-party modules with Modbus, MQTT and both dashboards, the minimal and debian variants, the Docker Hub tags and the full restore. It also explains that the image healthcheck stays healthy with the flows stopped: add a probe against a flow endpoint, as the guide to Docker Compose healthchecks and restart policies describes. The official reference is the Node-RED documentation for Docker.
FAQ
Why does Flows stopped due to missing node types appear after moving to Node-RED 5.0?
Because the 5.0.10 image ships Node.js 24 and the /data volume keeps native modules installed under Node.js 20. In this lab, lzma-native has its binary in a node-v115 folder and Node.js 24 looks for node-v137. The speedtest type is not registered and Node-RED starts no flow.
Does the error show up in the container log?
Not with that text. The log prints Cannot find module and Waiting for missing types to be registered, with the list of types. Flows stopped due to missing node types is the notice the editor receives: the lab reads it from the /comms websocket and the /locales/editor catalogue.
Why does one broken node stop the flows that do not use it?
Node-RED waits for every node type in the flows file to be registered before it starts any of them. In the capture, the /estado endpoint is not wired to the speedtest node and still returns 404 until the module is rebuilt.
Can I go back to Node-RED 4.1 after running npm rebuild?
Yes, by restoring the backup. The lab's archive keeps /data with the Node.js 20 modules. The original guide tested the rollback: empty the volume, extract the tar and pin NR_TAG=4.1.18-20. This lab does not record that restore.