Hi all,
I have been facing an issue in starting node-red and am unable to figure out why is it happening. The following is the error that it throws whenever i start node-red. I hope you can help me out.
Welcome to Node-RED
===================
12 Dec 17:50:30 - [info] Node-RED version: v1.0.3
12 Dec 17:50:30 - [info] Node.js version: v12.10.0
12 Dec 17:50:30 - [info] Windows_NT 10.0.17134 x64 LE
12 Dec 17:50:32 - [info] Loading palette nodes
12 Dec 17:50:33 - [error] Failed to start server:
12 Dec 17:50:33 - [error] TypeError: Cannot read property 'forEach' of undefined
at Object.addModule (d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\registry.js:186:27)
at d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\loader.js:108:30
at tryCatchReject (d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:845:30)
at runContinuation1 (d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:804:4)
at Fulfilled.when (d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:592:4)
at Pending.run (d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:483:13)
at Scheduler._drain (d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:62:19)
at Scheduler.drain (d:\Profiles\gupta\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:27:9)
at processTicksAndRejections (internal/process/task_queues.js:75:11)
That won't work in this instance as the error is happening whilst loading the palette of nodes, long before the flows are loaded.
It would be good to know if you've added any new nodes recently. This error crops up from time to time but I don't think we know definitively what causes it. But a badly implemented module could do it.
you should still be able to remove it by opening a command prompt and changing to your node red directory (\Users<Username>.node-red) and then entering npm remove node-red-contrib-amqp
and then starting node-red
Yes, the error is still the same. and No. I did not install any other node. although i have tried to uninstall node-red using npm and deleted the folder from appdata (from temp and roaming folder). But it still didn't work..
What other nodes do you have installed? You should be able to go to \Users\<Username>\.node-red\node_modules and list all the files starting with node-red-... and that should show all the node-red and contrib modules.