@Colin, I know it seems odd but at the moment it more or less behaving. I may have copied the entire contents of the .node-red folder over not just the flows as my copy contains the entire .node-red folder.
IF it starts going wrong again I'll report back - I was almost at the stage of downloading a new install and start over, that probably would have been the best thing to do ...
I confused matters by mentioning nodejs 13 (I have removed that comment since), I was getting mixed up with another very similar thread where nodejs 13 is involved. It is not an issue here however.
Node-red would start without any errors in the log however, it still had the 'lost connection to server' so I've decided to go back to an on .img file I have - I did make an image of the outgoing node-red though ..
Now that you have got rid of the errors it is just a matter of finding what is causing the hangup, which is usually not difficult, usually it is a lockup in a function node, an mqtt loop or other loop in the logic.
I don't think it was a problem with the flows as I follows @Paul-Reed and removed them Iand I still had the error.
Bit now I'm reflashing an old-er image file I have and copy my flows over to it. But I think that image file has issues which I can't remember what they where ! - as I named it BUST-Node_red.img
My saved image I had doesn't appear to work. I think I'll start over with a fresh install, is Raspbian the best way to go from here https://www.raspberrypi.org/downloads/raspbian/
then run the node-red install script ?
Did you try it again with the empty flow file since you nuked it and ran the script? I suspect that you will find it is now ok.
If you want to start from scratch then yes, install raspbian, run sudo apt update && sudo apt full-upgrade
to get everything up to date and then run the script.
Thanks @Colin, It took me >2.5hrs to download the zip image - slow connection !
It must have been ~7 years ago since I last downloaded an image. Just figured out how to ssh from headless and now just applied the updates then the script.
I had to remember to turn off by hand ! the standard light last night as it's controlled by node-red of this PI.
I there a easy (lazy) way of install the missing nodes ?
That didn't' do much. I have manually installed all of the nodes however, I installed one incorrect one and I can't remove it.
14 Apr 10:48:10 - [info]
Welcome to Node-RED
===================
14 Apr 10:48:10 - [info] Node-RED version: v1.0.5
14 Apr 10:48:10 - [info] Node.js version: v12.16.2
14 Apr 10:48:10 - [info] Linux 4.19.97-v7+ arm LE
14 Apr 10:48:12 - [info] Loading palette nodes
14 Apr 10:48:19 - [info] Worldmap version 2.3.5
14 Apr 10:48:19 - [info] Dashboard version 2.20.0 started at /ui
14 Apr 10:48:21 - [warn] ------------------------------------------------------
14 Apr 10:48:21 - [warn] [ttb-node-owntracks/owntracks] Error: Cannot find module '/usr/lib/node_modules/node-red/nodes/core/io/lib/mqttConnectionPool'
Require stack:
- /home/pi/.node-red/node_modules/ttb-node-owntracks/owntracks.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js
14 Apr 10:48:21 - [warn] ------------------------------------------------------
14 Apr 10:48:21 - [info] Settings file : /home/pi/.node-red/settings.js
14 Apr 10:48:21 - [info] Context store : 'default' [module=memory]
14 Apr 10:48:21 - [info] User directory : /home/pi/.node-red
14 Apr 10:48:21 - [warn] Projects disabled : editorTheme.projects.enabled=false
14 Apr 10:48:21 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
14 Apr 10:48:21 - [info] Server now running at http://127.0.0.1:1880/
14 Apr 10:48:21 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
14 Apr 10:48:22 - [info] Waiting for missing types to be registered:
14 Apr 10:48:22 - [info] - owntracks
Following on from my last where are the dashboards layout details stored, as I thought restoring the flows would have restored the dashboards layouts as well ?
Possibly you probably didn't restore package.json.
You can't remove the node from inside node red because it is in use. You will have to do it from the command line as you have done before
cd .node-red
npm uninstall whatever-it-s
npm install the-right-one
and restart node-red.
The layout is in the flows file. As always fix the problems that you know how to fix and often the problem you don't understand will go away. Not always though.
Your right I didn't restore the package.json file - would it hurt if I did it now ?
It's funny how I forget how to do even the most basic things, having only go into node-red very infrequently - usually a 'major disaster' caused by my own stupidity !
All I did is restore the flows via Import > select file my .json backup file
If when following forum replies, things don't work as expected, you may find it beneficial to post and say so, instead of deviating and going your own way.
Numerous times in this thread we've made suggestions, only to find that you've already
jumped ahead & made other changes, and possibly made things more difficult for yourself.
Please don't take this the wrong way
No problem @Paul-Reed I entirely agree with you, I can be a total idiot sometimes not listening and misreading help. Going my own way messing things up.
I think what it is I hate keeping people waiting for a reply and then, them thinking I'm ignoring their help.
There is no point if you have already installed the extra nodes.
I don't know what might cause the not configured problem. Open one or them up and see what the problem is. Were you making use of any environment variables, or something that you had setup in settings.js?