Node-RED startup error: TypeError: Cannot set property 'type' of undefined

Hi.

I think I made an error in a function node, because I am now getting the error below when I start node-RED, it will not start and throws this error.

26 Feb 07:05:57 - [red] Uncaught Exception:
26 Feb 07:05:57 - TypeError: Cannot set property 'type' of undefined
    at Function node:451f6a27.3fe0e4:19:28
    at ChildProcess.exithandler (child_process.js:294:7)
    at ChildProcess.emit (events.js:321:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:443:11)
    at Socket.emit (events.js:321:20)
    at Pipe.<anonymous> (net.js:668:12)

I tried looking at my flow file, and thought I would just edit the JSON flow file and comment out the what looks like the offending text in the flow file, but no joy.

Any suggestions on how to get past this?

Thanks!

start Node-red with --safe flag, fix your mistake and continue as usual

node-red --safe

1 Like

Thanks!

Will definitely try that next time.

In this case, I ended up editing the JSON flow file (again) directly, commenting out all potentially offending lines in the function (this is probably considered back practice, sorry), and got it to start up.

Will definitely try "safe mode" next, time for sure!

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