[error] Failed to start server:
[error] Error: Error loading context store: SyntaxError: Unexpected token u in JSON at position 0
at /usr/local/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/context/index.js:177:15
at <anonymous>
If this isn't a bug, where should I be looking for my mistake?
My guess is that you have a corrupted context store file. Whether node-red should fail to start in that case I don't know.
If you have a look at https://nodered.org/docs/api/context/store/localfilesystem it shows you where the context files are stored. If you don't have anything that you need already in the context then if you rename the context folder and start node red then I expect it will recreate it for you. Rename rather than delete, for the moment, in case one of the experts wants to have a look at the contents.
That seems to be it. Renamed the context folder, and all seems well. No time to look for the culprit, but I saved the old folder and have a candidate in mind. Thanks!
Not sure what you mean here. When I followed @Colin's advice, NR re-created the files for everything in the flow that used persistent context. It could be better for NR to fall back on memory-only context storage and post a warning in the editor. I might have sorted it eventually on my own, but I really wasn't sure how to proceed.
In fact, you were right. I used the contextStorage property exactly as it is in the settings.js file on GitHub -- no config object at all. I assumed I would get the defaults. Is that asking for trouble?