At my company, I maintain a Node-RED 0.18.4 instance that's hosted on Heroku [I didn't do the initial install]. I'd like to upgrade this instance to the current Node-RED version.
What's the best way to go about this [considering the lack of a normal filesystem + shell on Heroku?] I read the docs below and searched around but didn't see info about upgrading on Heroku as such.
Addendum re : general upgrading via npm [other instances/cases] : once one has upgraded to the latest version using
npm install -g --unsafe-perm node-red
is there a way to roll back to the previous installed version [in the event, say, that things don't work as intended after upgrade] ?
UP. I have the same situation.
As with any npm installed module you can add
@x.y.z to the command to select a specific version e.g.
npm install -g --unsafe-perm email@example.com
The main thing to note is if you also upgrade the version of node.js. You will need to go into your
.node-red directory and run
npm rebuild in order to rebuild any nodes you may have installed that have a binary component within them.
I’ve used heroku in the past. I’d say do a practice deploy on a separate dyno first and import your flows to see if everything keeps working. For the actual installation, rather than updating through the shell, clone the deployed repo and edit your package.json file to modify the versions in it, then deploy it to have it update the versions. And as Dave says, make sure that nodejs itself gets updated to, you might need a different buildpack to do that but it’s about a year since I last deployed a demo to Heroku, check the Heroku docs for nodejs applications to see how. Make sure to keep a backup of your current install so you can roll back if needed.
Awesome; thanks a bunch for the tips, guys!