7 Jan 13:55:38 - [info] Node-RED version: v2.1.4
7 Jan 13:55:38 - [info] Node.js version: v12.22.8
7 Jan 13:55:38 - [info] Linux 5.10.52+ arm LE
I wanted to check on setting up Node-Red Dashboard on a RPi Zero W. The official install configured Node.js 10.24.0. But the Dashboard said it requires node.js 12 or higher. Surprisingly, the nodes I was using from the dashboard seemed to work (ui_chart and ui_gauge). But I thought perhaps all was not as it should be and tried to install Node.js 12.
So I downloaded what appeared to be the last Node.js 12.x tarball for linux-armv6l from the "experimental" Node.js web site, extracted the files, and copied to /usr/local. This was a recommended procedure I found online to update the version of Node.js on a Raspberry Pi. While node and npm reported the new versions, I got a segmentation fault trying to run node-red. Attempting to run npm rebuild or npm install didn't help. Researching what might cause a segmentaion fault in node I ran across a suggestion to run the following commands:
sudo apt --auto-remove purge npm
sudo apt --auto-remove purge nodejs
It was worth a try. This appeared to work. Node-RED now starts and runs without any problem as above and the Dashboard seems happy for now.
I have a lot of experience doing C programming on MCUs but I am new to Node-RED and a newbie in JavaScript. Honestly I don't know what I'm doing here though and I thought someone on the forum might offer an explanation and critique. While it seems to have worked for me by trial and error, is the above method OK? And if you could take the time to offer an explanation as to what it did I'd be interested to hear it.
Thanks, Max