On windows, when upgrading Node.js from 8 LTS to 10 LTS, is there any specific steps I should/must take?
By this I mean should/must I re-run Node-red installer after node.js?
How about a contrib node that does a node-gyp step on install?
Possibility of running node.js 8 & 10 side by side?
Any bad experiences anyone?
Any advise appreciated and welcomed.
NOTE: I have searched the forum and have seen some people have had issues but I cant see any defined steps (I admit I spent only 5 mins looking but its a difficult one to pin down & I need to get this right 1st time).
I’ll readily admit I haven’t tried this on Windows so others will have to come in there. On Linux/Mac, nvm exists to keep multiple versions of Node running on the same machine. There have been several attempts to create a similar thing for windows. This one has 10k stars on GitHub, an active developer, and the documentation is pretty straightforward, leading me to think it might be worth a try. Especially as it keeps the version selected over reboots/updates the version to all open commandline prompts, and does not depend on node itself. For your other questions I do not have an answer.
I thought there was a bit about this in the docs, but I can't find it. In fact I can't find instructions for installing on Windows at all, which is a bit odd.
On a major update for any platform, you should rebuild your nodes. While this is not needed for all nodes (only for some that require compiling), it is safer to do it for everything.
Personally, I simply delete the <userDir>/node_modules folder and then reinstall:
I have been using nvm-windows on my Win10 development machine at work for some time now. It uses those Windows symlinks to switch between versions.
The only annoying thing (or feature?) is, that it does not migrate your global packages. You have to install them manually with every new NodeJS version. I simply move or copy them over, when it is just a minor NodeJS version jump.
All in all, it works just fine. But since I am hardly ever using different Node versions at the moment, it is just for convenience in the upgrade process (in contrast to an MSI installer package or handling NodeJS versions manually)
Personally, I just stick with the current LTS version or thereabouts on my Windows dev machine. I need to get better at doing some testing though. My recent release of alternate-node-red-installer makes testing a lot easier since a simple command creates a new, completely clean installation of Node-RED in a new folder. If I need to test with another version of node.js, I can simply install that into WSL and test again from there.
I don't like faffing with any of the multi-version tools, I much prefer to stick with the official installs.
WSL is a virtual Linux environment running under Windows 10. So you get a lightweight VM effectively.
So you can use WSL like any other Linux environment. Install node.js (and a version manager if you want to), then install Node-RED, etc.
Interestingly, I no longer use PuTTY - actually KiTTY - to connect to my Pi's. I use WSL with SSH command line client with a Windows shortcut to fire it up. This is actually faster! Go figure.
Thanks for that one. Never heard of KiTTY, but it actually has a lot of features that I have missed in PuTTY for all the years. Will give it a try tomorrow at work... no Windows at home... fortunately.