Windows 10 [error] Failed to start server: [error] TypeError: Cannot read property

Hi @dougcr4

this is a rare issue that we've never managed to get to the root cause of.

If you are still hitting it, could I trouble you to add a bit of debug into the code to help us figure it out?

Specifically, if you edit the file C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules@node-red\registry\lib\registry.js and look at line 186 you should see:

                set.types.forEach(function(t) {
                    if (nodeTypeToId.hasOwnProperty(t)) {

Please add the following immediately before it:

                // START DEBUG
                if (!set.types) {
                    console.log("Module:",module.name);
                    console.log("Path:",module.path);
                    console.log("Set:",setName);
                }
                // END DEBUG
                set.types.forEach(function(t) {
                    if (nodeTypeToId.hasOwnProperty(t)) {

The next time you restart Node-RED you'll get a bit more information in the log about what node module its loading when it hits the error

4 Likes