node-red / linux-installers

Node-RED install scripts for various flavours of Linux
Apache License 2.0
94 stars 63 forks source link

Changes required for updating to Node14 / Node-RED v2 #13

Closed dceejay closed 2 years ago

dceejay commented 3 years ago

Part of Node-RED v2 is dropping support from node v8 and 10. While are at it we may as well make the default install the current LTS version 14.

The current install/upgrade script leaves node 10 and 12 alone. If other version found it will install node 12. It also then runs npm rebuild in the .node-red directory in order to update any existing nodes in there.

However we know that while most older nodes with a binary component will recompile ok - some either won't (usually they have even older pre-reqs internally like older serialport versions) - or the currently installed version of the node also needs updating first so it is "node14 ready"

This does leave us in several situations 0) Some may just work 1) Some nodes are just going to break/be broken and won't be recoverable 2) Some nodes may just recompile and work 3) Some may need upgrading first - then compile ok - but may then break flows due to other changes they have 4) Some may upgrade - recompile and then work.

Hopefully most would be in the last camp but... we need to somehow warn people the other cases may occur, and ideally offer a way out.

Currently the script won't force a node.js upgrade - but as node 8 and 10 will be end of life we need to do something.

Option A

1) Leave existing script - but add warning saying Node-RED v2 may not work / is unsupported - and user should prepare to migrate. 2a) Add a new script that forces upgrade to nodejs14 - leaves existing extra nodes as-is - does a rebuild 2b) Add a new script that forces upgrade to nodejs14 - tries to reinstall any extra nodes @latest - does a rebuild

either with warnings that nodes may break when they do.... offer chance to escape first.

Option B

Other - TBD

dceejay commented 2 years ago

Latest script now has --node12 --node14 and --node16 options to force reinstall