Weird Node-Red errors when working project is running for about 30mins

I recently moved a project from a pi3 to a pi4. Everything seems fines for about 30 mins, then when I try to deploy I get the following; (hmm, I cant paste an image or include a graphic file)
"Error: Cannot find module '..encodings'
Require stack:

  • /usr/lib/node_modules/node-red/node_modules/body-parser//node_modules/iconv-lite/lib/index.js"
    and about 15 similar lines for read.js, json.js.index.js etc
    once this happens, logging to the log file stops. If I break out of node-red-log and do an ls, I get an error from bash to say the ls is not found. It doesn't recognise any shell command.
    The only way to get out of this is a hard reset of the pi.
    I have tried reinstalling node red with the bash script but it makes no difference.

I have absolutely no idea how to begin debugging this. I hope someone can point me in the right direction.
gary

Reboot, then, in a command window run
sudo journalctl -f
do you see any obvious errors?

If not, leave that window open and operate the system normally and see what transpires. I suspect this is a hardware issue of some sort, not directly related to node-red. Most likely a problem with the SD card or PSU.

1 Like

The first error I came across in the journal was that the zigbee2mqtt herdsman wasn't starting. I put that rights and everything is running hunky dory. Thanks! journalctl will become a regular tool!