I have developped a flow on my laptop (localhost) in order to read data on a Siemens PLC.
It works perfectly well on my computer. Afterwards, I've tried to import the flow on an industrial PC (Simatic IOT2050, Siemens), which will replace my actual PC in the future.
I have this error when I deploy the flow :
"Installation of module node-red-node-mysql failed:"
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: node-red-node-mysql@2.0.0
npm ERR! notsup Not compatible with your version of node/npm: node-red-node-mysql@2.0.0
npm ERR! notsup Required: {"node":">=16"}
npm ERR! notsup Actual: {"npm":"7.5.2","node":"v12.22.12"}
It is weird because I do not use MySQL nodes in my flow. And because I have this module on my laptop and not in the IOT, it prevents the flow to run. So I am forced to install this module. The reading of the data does not start like on my laptop. I've tried to update node-red to fix the problem but it does not work too :
If you can avoid those hardware units I strongly recommend doing so. You will avoid a lot of trouble. On my last look (a couple months back) That unit does not have official support for anything above node V12. That is super old and completely unsupported. I feel the lack of support by the manufacturer is a huge let down. A raspberry pi (or other industrial computer) would be better.
Did you accidentally copy a node? How did you copy the flows to this other box?
You need to upgrade nodejs to at least 16. Preferably to 18 which is the current recommended version. You currently have v12 installed. You will need to investigate how to do that on the Siemens device, if it is possible.
Indeed you must have got the mysql node installed on the device even if you don't need/use it. so you need to uninstall it first. I'm not sure how you do that on that particular device - but on standard linux machine you would go into your .node-red directory and run npm uninstall node-red-node-mysql and then reboot.
Sadly by then trying to upgrade Node-RED you have updated a load of other libraries and nodes which are now broken - so yes - you are now in a place where either you go back to clean install and just install the nodes you need (and not mysql) - or as Colin says find out how/if the device can be updated to use nodejs 18 or 20.
I have tried to update nodejs on the latest version, but like you said the hardware is not well supported.
After the update, I didn't succeed to start node red anymore... So I restored the v12 and it's still not starting. I think the update modified something that prevents the start of Node Red. Now I'm trying to solve this problem, it's not simple.
It would have been easier to unstall sql nodes from my laptop and import the flow after, but I didn't know that I'll have this kind of problem with updating node red...
Maybe Raspberrypi would be more efficient and convenient in time, I have to think about this.
I'll let you know if I succeed to solve the problem. Thanks for your replies.
Hello everyone, I've finally decided to reinstall the OS on my IOT, it was the easiest and the fastest way to solve my problem. With the default settings it works perfectly. I have just uninstalled the mysql module from the flow before importing in order to avoid this issue again. Be careful when you use this kind of equipment !
And I can't use Raspberry pi because it is not secured enough. The IOT is protected with a high level of cybersecurity, that is why we have to use it in our industry.