I have installed the node ui-media (1.2.0) to upload a picture to my dashboard. I follow the instructions of the node but when I try to upload the image my Node-Red crash and appear the following message: Lost connection to server. Here is my node-red and node.js versions:
Node-RED = v3.0.2
Node.js = v16.17.0
Start node red in a command window and leave that window open. Then make it crash and copy/paste the full output from the terminal. Not screen shot please.
I think you aren't starting it correct way to keep the command prompt open after crash.
You should start the command prompt.
Then type in the command node-red to start it.
Your video starts at the point where Node-RED already is running, so we cant be sure...
Thank you for your advice. Now I can get the failure messges:
11 May 18:40:35 - [red] Uncaught Exception:
11 May 18:40:35 - [error] TypeError: path must be absolute or specify root to res.sendFile
at ServerResponse.sendFile (C:\Users\yk000chan\AppData\Roaming\npm\node_modules\node-red\node_modules\express\lib\response.js:441:11)
at C:\Users\yk000chan\.node-red\node_modules\node-red-contrib-ui-media\ui_media.js:288:17
at FSReqCallback.oncomplete (node:fs:196:23)
I try to use ui-media in raspberry pi and also cannot display the image.
My NR is v3.0.2
Node.js is v16.20.0
The system does not crash but only the image cannot be display and no preview can be got in the node-red console.
Do I need to modify anything inside ui-media.js?