Installing Dashboard 2.0 offline

Sorry if this is a repost, but would appreciate your help:
We run Node-red on a few Linux environments that are disconnected from the internet. the installation was done by copying as-is the user & Node-red directories from a local installation. So far so good.

We now wanted to add Dashboard 2.0. I installed it locally and copied the whole @flowfuse/node-red-dashboard directory to the isolated machine's node_modules. the dashboard 2.0 nodes are recognized, but load incorrectly. Further drill-down show they fail to allow the definition of a base "UI" for the page.

Any idea what I missed in the installation process?

Hi @omrid,

Its not that simple - and you will quickly see this is not going to work,
You also have to copy the following node modules

 "dependencies": {
        "acorn": "^8.11.2",
        "chartjs-adapter-luxon": "^1.3.1",
        "core-js": "^3.32.0",
        "d3": "^7.8.5",
        "escodegen": "^2.1.0",
        "express": "^4.19.2",
        "socket.io": "^4.7.1",
        "vue": "^3.4.5"
    },

Then for each of those, find out their dependencies, and copy them over as well... Rinse & Repeat..

Good luck if you want to do this, else - you need to copy over the the entire node_modules folder every time you do an install.

Thanks!
I'll just copy all

Note that for that to work the two systems must be running the same OS and version have similar hardware and the same version of nodejs.

Also copy across package.json. Otherwise if npm is invoked on the target machine it will likely remove the extra nodes.

1 Like

Thanks Colin. When installing Node-red, does it set a secret setting somewhere indicating the OS it is running on?

It’s not about any secret - it’s more about architecture & platform.

Some modules when installing a node, get “compiled” for the platform / architecture.

Example : node-red-serialport, gets compiled specifically for the platform /architecture.

So simply moving it to a different machine, say from an Arm Based Windows Machine, to an x64 Linux box - it will fail spectacularly!

But as far as I am aware nothing is stored - only the resulting binaries when things get compiled

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