Today I had to migrate my IOT VM from a AMD64 system to a ARMv7. I ran it on a photon+docker host and now is installed in a Raspbian+docker in a raspberry.
I simply moved the node-red docker volume with all it's contents to the new appliance so naively.
Now when I enter nodered, I face the "Flows stopped due to missing node types (mysensorsdb)" hint.
Inspecting the logs (in docker) I find the following messages:
> node-red-docker@1.0.4 start /usr/src/node-red,
> node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data",
,
7 Apr 21:46:57 - [info] ,
,
Welcome to Node-RED,
===================,
,
7 Apr 21:46:57 - [info] Node-RED version: v1.0.4,
7 Apr 21:46:57 - [info] Node.js version: v12.16.1,
7 Apr 21:46:57 - [info] Linux 4.19.97-v7+ arm LE,
7 Apr 21:46:58 - [info] Loading palette nodes,
7 Apr 21:47:05 - [info] +-----------------------------------------------------,
7 Apr 21:47:05 - [info] | uibuilder initialised:,
7 Apr 21:47:05 - [info] | root folder: /data/uibuilder,
7 Apr 21:47:05 - [info] | version . .: 2.0.7,
7 Apr 21:47:05 - [info] | packages . : vue,bootstrap,bootstrap-vue,socket.io,http-vue-loader,vue-moment,vue-router,axios,vue-axios,
7 Apr 21:47:05 - [info] +-----------------------------------------------------,
7 Apr 21:47:06 - [warn] ------------------------------------------------------,
7 Apr 21:47:06 - [warn] [node-red-contrib-mysensors/mysdb] Error: Cannot find module '/data/node_modules/sqlite3/lib/binding/node-v72-linux-arm/node_sqlite3.node',
Require stack:,
- /data/node_modules/sqlite3/lib/sqlite3.js,
- /data/node_modules/sqlite/main.js,
- /data/node_modules/node-red-contrib-mysensors/dist/lib/database-sqlite.js,
- /data/node_modules/node-red-contrib-mysensors/dist/nodes/mysensors-db.js,
- /usr/src/node-red/node_modules/@node-red/registry/lib/loader.js,
- /usr/src/node-red/node_modules/@node-red/registry/lib/index.js,
- /usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/index.js,
- /usr/src/node-red/node_modules/@node-red/runtime/lib/index.js,
- /usr/src/node-red/node_modules/node-red/lib/red.js,
- /usr/src/node-red/node_modules/node-red/red.js,
7 Apr 21:47:06 - [warn] [node-red-node-sqlite/sqlite] Error: Cannot find module '/data/node_modules/sqlite3/lib/binding/node-v72-linux-arm/node_sqlite3.node',
Require stack:,
- /data/node_modules/sqlite3/lib/sqlite3.js,
- /data/node_modules/node-red-node-sqlite/sqlite.js,
- /usr/src/node-red/node_modules/@node-red/registry/lib/loader.js,
- /usr/src/node-red/node_modules/@node-red/registry/lib/index.js,
- /usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/index.js,
- /usr/src/node-red/node_modules/@node-red/runtime/lib/index.js,
- /usr/src/node-red/node_modules/node-red/lib/red.js,
- /usr/src/node-red/node_modules/node-red/red.js,
7 Apr 21:47:06 - [warn] ------------------------------------------------------,
7 Apr 21:47:06 - [info] Settings file : /data/settings.js,
7 Apr 21:47:06 - [info] Context store : 'default' [module=memory],
7 Apr 21:47:06 - [info] User directory : /data,
7 Apr 21:47:06 - [warn] Projects disabled : editorTheme.projects.enabled=false,
7 Apr 21:47:06 - [info] Flows file : /data/flows.json,
7 Apr 21:47:06 - [info] Server now running at http://127.0.0.1:1880/,
7 Apr 21:47:06 - [warn] ,
,
7 Apr 21:47:06 - [info] Waiting for missing types to be registered:,
7 Apr 21:47:06 - [info] - mysensorsdb,
So it's proven that my system is not platform agnostic.
Is there a way to make it download/repair the required dependencies without rolling it all and re-importing the flows? That shouldn't be easy...