I have hesitated to ask about this issue because at first I it seemed hard to reproduce. It may also be platform specific, since it happens on my mac but not (apparently) on a Rpi. Recently, though, I have started shutting down my mac every night instead of just putting the machine to sleep (see below), and it has really started to make me crazy. So here goes.
If I shut down and restart my mac (macOS 10.11.6), having stopped NR first, when I restart NR it fails to find the current project and uses the default flows file instead:
Welcome to Node-RED
1 Feb 12:55:14 - [info] Node-RED version: v0.19.5
1 Feb 12:55:14 - [info] Node.js version: v8.11.2
1 Feb 12:55:14 - [info] Darwin 15.6.0 x64 LE
1 Feb 12:55:14 - [info] Loading palette nodes
1 Feb 12:55:15 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
1 Feb 12:55:16 - [info] Dashboard version 2.13.2 started at /ui
1 Feb 12:55:16 - [info] Settings file : /Users/mikebell/.node-red/settings.js
1 Feb 12:55:16 - [info] Context store : 'default' [module=memory]
1 Feb 12:55:16 - [info] User directory : /Users/mikebell/.node-red
1 Feb 12:55:16 - [warn] No active project : using default flows file
1 Feb 12:55:16 - [info] Flows file : /Users/mikebell/.node-red/flows_MIB-MBP.local.json
1 Feb 12:55:16 - [info] Server now running at http://127.0.0.1:1880/
The editor knows that projects are enabled, but the
Projects/Open menu item is grey. The
.config.json file contains
So it is as if this file is not being read (assuming that is where NR should be looking). I can recover by stopping and restarting NR. The dialogs that follow include:
The flows on the server have been updated.
The server is running a more recent set of flows.
The changes include no conflicts and can be merged automatically.
Merging shows all nodes as "dirty" but the
Deploy button is disabled. After refreshing the browser, everything is back to normal.
I should mention that I start NR from the command line, since I have never figured out how to run it as system service on the mac. I use systemd on the Rpi, so I suppose this could make a difference. Any thoughts?