# Broken dependency after migration

**URL:** <https://discourse.nodered.org/t/broken-dependency-after-migration/24425>\
**Category:** General\
**Created:** [7 April 2020 20:04 UTC](https://discourse.nodered.org/t/broken-dependency-after-migration/24425 "2020-04-07T20:04:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SeRiusRod](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@SeRiusRod](https://discourse.nodered.org/u/SeRiusRod)\
**Post date:** [7 April 2020 20:04 UTC](https://discourse.nodered.org/t/broken-dependency-after-migration/24425/1 "2020-04-07T20:04:40Z")

</div>

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:

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

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [7 April 2020 20:10 UTC](https://discourse.nodered.org/t/broken-dependency-after-migration/24425/2 "2020-04-07T20:10:47Z")

</div>

Connect into your running container and run: `npm rebuild` in `/data` to rebuild the native modules for the new architecture.

You _might_ need to run `npm install sqlite3` as well.

---

<div class="post-metadata">

**Author:** ![SeRiusRod](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@SeRiusRod](https://discourse.nodered.org/u/SeRiusRod)\
**Post date:** [7 April 2020 20:49 UTC](https://discourse.nodered.org/t/broken-dependency-after-migration/24425/3 "2020-04-07T20:49:18Z")

</div>

Spectacular. Your indications fixed the installation and in record time.  
Thank you very much.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 April 2020 20:49 UTC](https://discourse.nodered.org/t/broken-dependency-after-migration/24425/4 "2020-04-21T20:49:23Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
