NODE RED ERROR : The server wont start so I cant view the flow, I suspect a change I performed last night

I got this error when I started up node-red today. Last night I added 2 nodes for the UI table BUT the 3rd node which I attempted to add failed to install. Anyway, I worked with what was installed and set up my dashboard. The data did not load as planned but there was no error either.

Now when I try to load it this error comes up and I have no way forward.

I know how you can recover this (and I promise I will tell you) but in the interest of the community, could you please first upgrade to node-red 2.2.2.

I believe it with node-red 2.2.2 the error you receive will be a lot clearer as to the cause.

Before you upgrade, I'd recommend backing up your .node-red folder (just copy everything except node_modules) to another location. Just to be safe (but shouldn't be needed other than a safety blanket)

The "node-red" folder is inside "node_modules" and it is the only folder in it.

No, thats the main installation of node-red. I mean the user .node-red folder that gets created when you run node-red (it holds your flow files & custom nodes etc).

In a standard windows installation that will likely be c:\users\evan1\.node-red (you might need to enable view hidden folders in explorer or run DIR from a command prompt)

Got it, I copied the whole folder . Can I just delete the "node_modules" folder in it, later for when we need it: to full your condition?

Just so you know: the "flow" folder is empty.

the node_modules folder is auto populated when npm install is ran - so no need to keep it. In fact, sometimes it is better to delete it.

Any how, for now, please install the 2.2.2 update.

Do you need assistance or are you ok with doing that? (should be no different to what you did to get V2.2.0) (obviously apart from you dont need to instal node-js again)

I ran this command: npm install -g --unsafe-perm node-red to upgrade to node-red 2.2.2

and this: npm i node-red
but I still get the same error.

Hmm, that is disappointing.

BEFORE you fix this - could you share (privately - DM me) your package.json and flows.json files please?

After that, you should start node-red in safe mode to fix your issues.

node-red --safe

Then you can fix up your flow.

If you cannot start this flow or dont know how to fix it, you should have a backup flow named flows.json.backup that you can use to recover

(NOTE: for windows you need to set explorer options to see file extensions)

Sure man, but how do I DM you ?, where is the control/widget for that

How to send @Steve-Mcl flow.json and package.json

Note: for all the less code/knowledgeable people still learning node-red. You can always help. Do you think @Steve-Mcl Should be spending his time making the how to send a Direct Msg slide show??? Steve-Mcl is a patient with new users and helps allot of people here on the forums with the technical stuff. If you can free him up to do the geek-ey things then step in.... you can always reduce others work loads.

3 Likes

Thank you soo much, its a very helpful step-by-step guide.

1 Like

I am not allowed to upload attachments to the message, no luck with the packages you requested.

I also tried starting in safe mode but I got the same error.

You weren't supposed to do that, you were supposed to paste the text in as shown in the pictures.

flow.json and package.json are text files. Just open them up, select all, copy and paste them as a string into the block

type or paste code here

one block for the flow.json and another block for the package.json

Not allowing binary data uploads (zip. exe. etc) is to protect users on the forums.
If its just txt data one can read, its harder to do malicious things

Its cool , I managed to DM it to him

1 Like

nice! :tada:

@Evan7 I got the day off. On beer 2 now :slight_smile: Reading up on ffmpeg commands and object detection stuff for absorption. Take your time. Ask questions. relevant to your issue.

@Steve-Mcl stated:
"I know how you can recover this (and I promise I will tell you) but in the interest of the community, could you please first upgrade to node-red 2.2.2."

I could tell he wants this to be a learning moment for others so he can site this post later for reference with this common issue.

That's fine man, I'm happy to support and be apart of the community , though I'm still novice.

1 Like

Hi Evan. I will be getting around to looking at your flow and package file but not tonight.

I want to understand what causes this issue and find a way to better alert the users when it occurs.

Did you manage to recover your flows from the backup?

no bro, I renamed the ".flows.JSON.backup" to "flows.JSON" but I get the same error. Should I try uninstalling and reinstalling node-red?