Installation of Node Red on Windows

Here's a text file that has the steps for installing everything required to run Node Red with the Windows Build Tools for those Nodes that require them.

This has been tested on both Windows 10 & 11.

There's also a winget option for this:
winget install --id=Microsoft.VisualStudio.2022.BuildTools -e>

Running the previous line in Powershell doesn't install the Windows Build Tools required.

Installation instructions for Node Red.txt (1.8 KB)

What ever happened to @ralphwetzel - Node-red-windows-installer ?

As stated before, the NodeJS package installer does this.

Unfortunately, i don't have a clean windows 11 platform to generate a much simpler set of instructions at the moment (I should have in a week or two)

Yes I've checked that box for every attempted install but it doesn't work and part of it is that this installer stalls forever when it tries to run the setup.exe file for the Build Tools and displays an error message. It does attempt to run the setup.exe file but if I try to run this file manually it states that I cannot run a second instance. I must end the task or reboot to clear this and then the setup.exe just opens and closes instantly so a manual install doesn't work either. Also this winget below doesn't help so it's obviously not installing the tools properly or at all.

There's also a winget option for this:
`winget install --id=Microsoft.VisualStudio.2022.BuildTools -e

Thanks

I will find a guinea pig machine and post the error message that I'm getting.

Many of the installers have a verbose command line option. Might be worth trying.

Also, do you have Visual Studio installed?

I do have Visual Studio installed. I'm going to clone a boot drive that hasn't any of this stuff installed and try some different installations to see if I can find out what's causing these issues with verbose turn on as you suggested

Then you don't need to install the Windows Build Tools as I think these are already included in a VS installation.

Thatā€™s what I thought too but after a few failed attempts and many fruitless web searches I found that I must install the Desktop Development with C++ Module in VS. If I donā€™t then the install doesnā€™t include the required Build Tools for those older Nodes.

That took me quite some time to figure out as Iā€™m so very new to Node Red and have little CLI knowledge. Anyway I uploaded a text file in a previous post that goes step by step through the install workflow that worked for me and adding the Desktop Development with C++ Modules is included in that guide.

Thanks

What a pain! I hate VS and its nightmarish installer.

For the record, on my very clean Windows 11 24H2 VM, the winget command didn't encounter any issues, it finishes the installation process. The -e option will make winget ask for elevated rights, so you don't have to run PowerShell with admin rights.

Yes, I believe that it is Visual Studio that is messing things up.

On my Windows 7, 10 & 11 laptops my first installed program is always Portable Apps (portableapps.com).
With that I can run Firefox and other browsers, Photofiltre, Thunderbird, Filezilla, Putty, Arduino ide and hundreds of other apps without them or their libraries being installed or polluting the registry.
Generally it's a single tick box per app and it's installed to a local folder or USB stick.

Sorry, but the instructions to install Node-red on Windows, derived from this and other threads AND the official documentation (paraphrased for simplicity):
"To install Node-red you should open a command window, or is it a powershell window? Download and install the latest version of node.js, but not if it's an odd number. Install npm or is it Visual Studio?, install Chocolatey or Sticky Toffee Pudding, then you might want to change the npm cache folder. If you want to use some nodes you will have to install windows-build-tools."
"To run Node-red open a command prompt, not a powershell window and type node-red. Or install and use pm2, but we won't tell you how or what it is, or create a task schedule, ditto"

If it wasn't a tragedy it would be laughable.

Is Node-red on Windows really harder to install than let's say Photoshop? an Office suite?

Is it too fantastical to imagine a USB stick with portable apps and Node-red that can be plugged into any PC and it runs?

Installing node-red is a super simple 1 line affair npm -g install... blah blah

However, node-red runs on nodejs and windows architecture is NOT (imo) ideally suited nor streamlined like Linux.

There is no simple off the shelf installer that easily packages all the different parts (at least not that I know of) however, there is no reason a batch or PS (script similar to the PI script) could not be written. But (and it's a big one), there is literally not one size fits all. Some will not have the necessary permissions, some will not want a global installation. Some will want a system wide installation (node global on windows is NOT system global), Some will want to run node-red under a limited service account. Some systems will have old libs (needed for some other applications). Some systems will not have the right version of python or outdated stuff. Some systems will need to run a certain version of node (for compatibility reasons). The list goes on.

These issues make for a complex installation (and many of these affect MacOs and Linux too).

Yes. That is a compiled application and there are many installer packages for those. And Adobe has a lot of workers and resources.

No, anything is possible.

Well no, you weren't paraphrasing, you were mixing different methodologies from separate resources with your own humour to make it look worse than it is (and yes, I agree it's not great, but it's doable)

The information written in this thread is verbose and some of it, I suspect, is unnecessary.

On a clean system you should be able to simply install node (with tools option ticked), install git, run the documented npm command. That's it. If that doesn't work, we need to find out why and fix it.

1 Like

Guilty as charged :person_raising_hand:

I am not actually sure how easy it is for a 12 year old child to execute the Raspberry Pi script and install NR on a Pi.
I really don't believe that same child could possibly identify and perform the right combination of actions to install it on Windows.
I base that on my personal lack of expertise in the Microsoft world and the confusion sown by conflicting "All you have to do is..." posts here and elsewhere.
Could be wrong of course.

The official documentation should be sufficiently clear and detailed to describe the entire process from prerequisites to automatic startup.
Where there are decisions to be made, offer explanations and guidance.
If more than a couple of steps are required, a video walk-through would help.

Do the official instructions actually work?
Perhaps they sometimes do but not when I first tried it, and presumably not for people who come here and ask "Is there any kind of installation guide for Node Red on Windows 11 that actually works?"

I can't suggest specific improvements because I don't understand any of the necessary steps, much less how to write an installer or make a video of it.

4 posts were split to a new topic: Custom Node-RED installer for Windows

Probably not the right place to air this but her I go anyway.

So here's my two sense about all these troublesome installs and software in general. I'm really tired of stupid changes that programmers and corporate developers like Adobe, Microsoft, Avid and every one else who's guilty of what I'm about complain about do. Now even Apple has jumped on this wagon with Sonoma.
My first example is Avid Media Composer which I've worked with for over 20 years. Around 6 to 8 years ago they decided to rework the UI and make both the Mac and PC UI's look and act alike. My first issue is that the new UI is terrible and second the previous UI as far as I'm concerned was so much better on Mac than it ever was on a PC and now they are both brutal. They also said they were going to revamp the entire menu structure to be more organized and make more sense. So I wonder how many people lost precious time trying to find menu items in these restructured menus, to this day there is the odd one that I still have a hard time locating. Now Adobe, they do this kind of stupidity in pretty much every major release and last Apple, they decided to murder System Preferences with the release of Sonoma. Again killing all my familiarity with it.
So now Node-Red, I'm not good at both CLI and Code Programming and yet this is how Node Red is installed. Problem is it took me half a day to figure out why I couldn't install certain Nodes and once I read a post somewhere about pretty much the same questions I had, I found the response to this to be. "Well the VS Build Tools for Windows are not really needed for Node Red". That was not the way to answer that guys question, the way to answer this was, "So the reason is because you need to install the VS Build Tools for Windows and how to accomplish that". Anyway this lead me barking up the wrong tree and it took forever for me to get it to all work properly, especially since the command line command that I kept coming upon would never install anything properly or at all, I'm not sure which. It kept coming up with errors and the fact that it was deprecated. I essentially have been forced into learning Node Red for a new implementation at work that I'm building all the hardware for because of a situation out of anyone's control with our programmer. Quite frankly I'm very pleased about this because just like XOD which I used until it stopped being developed this is more up my alley.

One should be able to find on our WWW an article that tells one how to install these things combined on one web page and when it changes create a new web page that explains the new instructions and what versions it applies to.

My apologies for this ridiculous novel, I just need to air my frustrations.

Who do you think should pay (or put in the hours voluntarily) for doing this work?

Everyone is free to suggest or make improvements to the documentation. :wink:

Yes.

Because it requires the node.js platform and the installation of some packages requires a C/C++ make step that needs a compiler. On Windows, that needs the Microsoft compiler which comes from a very different world - of complexity!

Node.js realised this and updated their Windows installer to include that dependency. Unfortunately, in this case, we have seen an edge-case where Microsoft Visual Studio gets in the way of that installation.

Partly. You can certainly have a stick with a node-red installation and maybe even a portable version of node.js (not sure about that bit though). BUT, Windows, Linux and MacOS have VERY different compiled application architectures. So anything that requires such a package either has to be shipped with binaries for all platforms or must be re-built for each architecture (which is the normal case).

This is really the big difference with Windows. Windows versions since NT are ENTERPRISE architectures first and foremost. They tend to be complex in ways that Linux is not and simpler in ways that Linux is not. They are simply very different beasts.

You are far more likely to come across setups with Windows that are fully managed. Which is to say that the user has little control.

The other thing that Windows failed to deliver (for complex reasons that related to the enterprise stuff) is a standardised installer. With linux, at least each flavour of linux tends to have a standard installer with apt being the most common only in that it is used by all the versions that are based around Debian (including Ubuntu, etc).

For an unmanaged Windows device with no management, installation of Node-RED really is no more difficult than on Linux. In some ways possibly easier. If you know your way around the Windows terminal. That is another issue with Windows users - fewer people are familiar with the terminal/command line - on Linux, it is largely a requirement! :slight_smile:

  1. Install node.js from the official installer.
  2. Open a new command line and npm install -g node-red (no admin rights required in most cases).
  3. From the same command line node-red

The final complexity for Windows is if you want to run Node-RED as a service - on Linux, most people probably use Dave's very comprehensive Debian script and that includes service setup. On Windows, there are various ways to run things in the background but to run a node.js microservice as a Windows service, requires an additional tool. That's why most of us run live Node-RED on Linux and dev only on Windows.

Steve has already explained some of the other complexities.

The script is a fantastic resource. And brilliant when it works (which thankfully is nearly always). But I can guarantee that the same 12yo will not have the capability to deal with things if the script doesn't work for some reason - and we have seen many cases here in the forum where adults can't either.

Not sure who might have said that. It is wrong, as you say. But that is the nature of free support from an open community. People don't always get things right. Though generally, someone will normally correct it when wrong.

On ALL platforms where you want to run Node.js apps, it is recommended to install the appropriate build-tools for the platform. That just gets the issue out of the way.

That is always the ideal. But most support for Node-RED is provided by the community and that requires that community members step up and raise and possibly fix documentation shortcomings. I know that I've contributed to the Windows install page in the past. But for those of us who have been around since the year 0NR, we don't read those pages because we don't need to. It needs someone newer to point out the issues and then someone to go fix them.

Here is what Brave Search's AI had to say on the matter of a portable version of Node.js:

For those needing a portable Node.js setup, the recommended approach is to use NodeJS Portable by Crazy Max or the nvm-noinstall method, as these are more actively maintained and have better community support.