Update broke MySQL, old versions of Node-red-nodes have been removed. Why and where are they?

Yes, I do updates statemenents.

When I try and update:

npm I node-red-mysql@0.1.9
Unknown command: "I"

To see a list of supported npm commands, run:
  npm help

C:\Users\tbg>npm i node-red-mysql@0.1.9
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/node-red-mysql - Not found
npm ERR! 404
npm ERR! 404  'node-red-mysql@0.1.9' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\tbg\AppData\Local\npm-cache\_logs\2021-09-06T22_42_31_523Z-debug.log

Auto correct on phone. Should be small i
npm i node-red-mysql@0.1.9
npm i node-red-node-mysql@0.1.9

Also, you should be in the .node-red directory when you run npm command.

Is C:\Users\tbg really installed there? Or is it C:\Users\tbg\.node-red?

It should be npm install node-red-node-mysql@x.y.z

Like I posted above :point_up:

1 Like

Thanks a ton Steve. We installed 0.1.4 and are back up and running error free.

It would be good if you could setup a new Dev env and replicate this error (but with less traffic) so it can be reported as an issue and resolved.

Also, strongly recommend you switch to prepared statements.

For what it's worth, my mariadb was happy with the insert you quoted, and the update on duplicate key.

I have node-red-node-mysql 0.2.1 and Mariadb 10.3.29. Node-Red 2.0.5, node 12.22.6

Thanks for checking.
I am 99% sure the catch node was only catching good inserts, so I am unable to catch one that is breaking the node and test it in Heidi.

ie, Yes, that statement you tested worked fine for my Heidi and my Node-RED latest versions as well.

I was going to suggest dumping msg.topic into a file to search for bad insert statements.
But reading back what I missed while typing, I see you are up and running again.

What is the site? It was interesting to follow the Kabul airlift on flight tracking sites.

The more it runs, the more things I am seeing that have changed or are broken
At this point I am going to look about winding everything back to were I was around v1.3 I think.

Yes, the whole Kabul thing is what pushed me from around 5,000 hits a day to a peak of 115,000 hits a day. The site was getting cut/pastes all over the place. Pretty cool/weird/fun to see Node-RED dashboard screenshots of my horrible layout in all corners of the web.

1 Like

Best thing would be to revert to a known working backup.

Don't think I can add anything to the analysis of the actual problem. However, there is certainly help to be had about doing backups (I have some shell scripts that do daily/weekly/monthly backups) and dev/test systems.

For myself, I always make sure that I install Node-RED locally (not globally) with the data in a sub-folder (see my alternate installer repo on GitHub). This means that the backup contains everything except the npm packages and a restore is as simple as stopping Node-RED, renaming the "live" folder, copying the last working backup to the live folder name, running npm install node-red@vxxxx --unsafe-perm --production in the root folder, npm install in the userDir subfolder and then restarting Node-RED.

Because the root folder is a complete version of Node-RED and its data, the moved version can still be run just by changing the port number for Node-RED (which I always make sure can happen with an environment variable).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.