Recovering flows.json from broken container

hi, i was running for a while node-red on a linux pc and for some reason the container broke and it dont want to start, how can i recover the flows.json file from it ?

the logs from when i try to start the container

Failed to start server:,
Error: Cannot find module '@node-red/editor-client',
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15),
    at Function.resolve (internal/modules/cjs/helpers.js:33:19),
    at Object.<anonymous> (/usr/src/node-red/node_modules/@node-red/editor-api/lib/editor/ui.js:27:44),
    at Module._compile (internal/modules/cjs/loader.js:778:30),
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10),
    at Module.load (internal/modules/cjs/loader.js:653:32),
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12),
    at Function.Module._load (internal/modules/cjs/loader.js:585:3),
    at Module.require (internal/modules/cjs/loader.js:692:17),
    at require (internal/modules/cjs/helpers.js:25:18),
npm ERR! code ELIFECYCLE,
npm ERR! errno 1,
npm ERR! node-red-docker@1.2.5 start: `node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"`,
npm ERR! Exit status 1,,
 ,
npm ERR! Failed at the node-red-docker@1.2.5 start script.,
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.,
,
npm ERR! A complete log of this run can be found in:,
npm ERR!     /data/.npm/_logs/2021-11-16T11_30_57_378Z-debug.log,
,
> node-red-docker@1.2.5 start /usr/src/node-red,
> node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data",
,
Failed to start server:,
Error: Cannot find module '@node-red/editor-client',
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15),
    at Function.resolve (internal/modules/cjs/helpers.js:33:19),
    at Object.<anonymous> (/usr/src/node-red/node_modules/@node-red/editor-api/lib/editor/ui.js:27:44),
    at Module._compile (internal/modules/cjs/loader.js:778:30),
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10),
    at Module.load (internal/modules/cjs/loader.js:653:32),
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12),
    at Function.Module._load (internal/modules/cjs/loader.js:585:3),
    at Module.require (internal/modules/cjs/loader.js:692:17),
    at require (internal/modules/cjs/helpers.js:25:18),
npm ERR! code ELIFECYCLE,
npm ERR! errno 1,
npm ERR! node-red-docker@1.2.5 start: `node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"`,
npm ERR! Exit status 1,,
 ,
npm ERR! Failed at the node-red-docker@1.2.5 start script.,
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.,
,
npm ERR! A complete log of this run can be found in:,
npm ERR!     /data/.npm/_logs/2021-11-16T11_31_59_061Z-debug.log,
,
> node-red-docker@1.2.5 start /usr/src/node-red,
> node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data",
,
Failed to start server:,
Error: Cannot find module '@node-red/editor-client',
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15),
    at Function.resolve (internal/modules/cjs/helpers.js:33:19),
    at Object.<anonymous> (/usr/src/node-red/node_modules/@node-red/editor-api/lib/editor/ui.js:27:44),
    at Module._compile (internal/modules/cjs/loader.js:778:30),
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10),
    at Module.load (internal/modules/cjs/loader.js:653:32),
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12),
    at Function.Module._load (internal/modules/cjs/loader.js:585:3),
    at Module.require (internal/modules/cjs/loader.js:692:17),
    at require (internal/modules/cjs/helpers.js:25:18),
npm ERR! code ELIFECYCLE,
npm ERR! errno 1,
npm ERR! node-red-docker@1.2.5 start: `node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"`,
npm ERR! Exit status 1,,
 ,
npm ERR! Failed at the node-red-docker@1.2.5 start script.,
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.,
,
npm ERR! A complete log of this run can be found in:,
npm ERR!     /data/.npm/_logs/2021-11-16T11_33_00_731Z-debug.log,
,
> node-red-docker@1.2.5 start /usr/src/node-red,
> node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data",
,
Failed to start server:,
Error: Cannot find module '@node-red/editor-client',
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15),
    at Function.resolve (internal/modules/cjs/helpers.js:33:19),
    at Object.<anonymous> (/usr/src/node-red/node_modules/@node-red/editor-api/lib/editor/ui.js:27:44),
    at Module._compile (internal/modules/cjs/loader.js:778:30),
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10),
    at Module.load (internal/modules/cjs/loader.js:653:32),
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12),
    at Function.Module._load (internal/modules/cjs/loader.js:585:3),
    at Module.require (internal/modules/cjs/loader.js:692:17),
    at require (internal/modules/cjs/helpers.js:25:18),
npm ERR! code ELIFECYCLE,
npm ERR! errno 1,
npm ERR! node-red-docker@1.2.5 start: `node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"`,
npm ERR! Exit status 1,,
 ,
npm ERR! Failed at the node-red-docker@1.2.5 start script.,
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.,
,
npm ERR! A complete log of this run can be found in:,
npm ERR!     /data/.npm/_logs/2021-11-16T11_34_02_379Z-debug.log,

The flows file should be outside the container. Do you perhaps know how you originally configured the volume mapping ?

Depending on your setup, can you do a:

docker inspect <container name> | grep -iA 2 volumes

and verify to which directory /data was mapped ?

1 Like

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