Node-red suddenly doesn't start anymore after a BSOD

Hello everybody,

I have Node-red installed globally under my user folder.
I have set it up with NSSM as a service and worked like a charm for months.

I was working yesterday and trying to mess around new speech_to_text nodes of various type.
Actually I found what I needed and went with other things. That made my pc crashing.

At reboot, the status of the NSSM Nodered service was PENDING. Tried to stop, restart, and removed the service, but nothing.

If I try to start from cmd "normally" the service stops with the following log:

Microsoft Windows [Versione 10.0.19045.3570]
(c) Microsoft Corporation. Tutti i diritti sono riservati.

C:\Users\xxx>node-red
14 Nov 08:30:18 - [info]

Welcome to Node-RED
===================

14 Nov 08:30:18 - [info] Node-RED version: v3.0.2
14 Nov 08:30:18 - [info] Node.js  version: v18.18.2
14 Nov 08:30:18 - [info] Windows_NT 10.0.19045 x64 LE
14 Nov 08:30:21 - [info] Loading palette nodes
14 Nov 08:30:26 - [error] Failed to start server:
14 Nov 08:30:26 - [error] TypeError: Cannot read properties of undefined (reading 'forEach')
    at Object.addModule (C:\Users\xxx\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\registry.js:195:27)
    at C:\Users\xxx\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\loader.js:153:34

C:\Users\xxx>

I tried to search the web and I found that I could uninstall the latest nodes, but actually I don't know the exact procedure to do that.
There's a way to find out which are the latest node I installed? Where do I have to delete them from?

Thanks in advance

Welcome @difedef

I would start by removing the node that you installed, that caused the BSOD, and what is presumably breaking Node RED.

You can do this with the following.

  • Using CMD
    • Navigate to C:\Users\xxx\.node-red <- Make note of the dot named folder
    • Run npm uninstall <name-of-node-you-installed>
    • Try Node RED again

Hi marcus,

thanks for the reply. I actually solved the problem thanks to this post:

I deleted dependencies from the package.json and the package-lock.json of the incriminated flows appeared in the log and deleted the folder manually.

Now I have a warning though about git (I think it's beacuse I copied .node-red folder maybe?) causing this warning (it appears twice) in the debug section:

Error: fatal: detected dubious ownership in repository at 'C:/Users/xxx/.node-red/projects/ProjectName'
'C:/Users/xxx/.node-red/projects/ProjectName' is owned by:
	'S-1-5-21-16142359-3949692286-4010545788-1001'
but the current user is:
	'S-1-5-18'
To add an exception for this directory, call:

	git config --global --add safe.directory C:/Users/xxx/.node-red/projects/ProjectName

And now the git history disappeared.

Do I have to open a new topic about that?

P.S. the BSOD didn't related to node-red, but I think I used other softwares and VMs that caused the BSOD, without stopping my node-red service (and probably without deploying some changes)

I don't use window, and it relates to NTFS permissions.
I'm sure someone who uses windows will chime in

While the user data is Windows, this is a GIT notification. You would see something similar on Linux/Mac if you copied data and changed ownership. GIT is simply warning you and asking whether you are happy with the change. Run the given command if you are happy that the directory is safe to use.

GIT is failing deliberately because it doesn't know if you trust the moved data. If you add the trust, I think it should re-appear.

1 Like

I solved all of the issues I had, giving commands required.

Thanks for the help

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