# Installing Node-Red on work windows machine

**URL:** <https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982>\
**Category:** Industrial\
**Tags:** windows\
**Created:** [15 June 2022 16:59 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982 "2022-06-15T16:59:54Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jts450](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jts450](https://discourse.nodered.org/u/jts450)\
**Post date:** [15 June 2022 16:59 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/1 "2022-06-15T16:59:54Z")

</div>

I am having to installing everything necessary for all available nod-red nodes on a windows work machine. First of all I cant install Chocolatey which includes all of the necessary tools on my work machine due to security reasons with Chocolatey.

Now I am looking at these instructions for installing windows built tools under Environment setup and configuration but when i run: (npm install -g windows-build-tools) I get some npn warnings in power shell. I will include this screen shot.

#### Prerequisites

> <https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules>

I am wondering if I need to look at option 2 here and install visual studio build tools and python separately or figure out why I cant install the windows built tools that includes everything necessary?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [15 June 2022 17:45 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/2 "2022-06-15T17:45:34Z")

</div>

If you chose to install the build tools (check box option on step 2) while running the official NODEJS installer, it may well install Chocolatey but you dont have to use it.

---

<div class="post-metadata">

**Author:** ![jts450](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jts450](https://discourse.nodered.org/u/jts450)\
**Post date:** [15 June 2022 17:49 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/3 "2022-06-15T17:49:57Z")

</div>

The problem is my work IT security has will not allow chocolatey so I was looking at the other options to get the necessary tools installed without chocolatey

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [15 June 2022 17:51 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/4 "2022-06-15T17:51:14Z")

</div>

I understand that, however needs must.

By itself, Chocolatey doesn't do anything with regard to updating the underlying operating system. I believe that you may be referring to an issue with a version of Node which included a Boxstarter script, which installed a number of Chocolatey packages, which also had the side effect of performing a series of Windows Updates during the installation. This was an unfortunate situation, but it has been resolved - in other words, your IT dept are being a bit draconian.  
You could always let nodejs installer the build tools then delete the Chocolatey stuff!

That said - are you actually intending of compiling native nodejs add-ons - OR - do you simply need a working node-red environment?

If you simply want node-js with the windows build tools, you could _try_ the old npm installation method...

> **[windows-build-tools](https://www.npmjs.com/package/windows-build-tools)**
>
> Install C++ Build Tools for Windows using npm. Latest version: 5.2.2, last published: 3 years ago. Start using windows-build-tools in your project by running \`npm i windows-build-tools\`. There are 7 other projects in the npm registry using...

---

<div class="post-metadata">

**Author:** ![jts450](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jts450](https://discourse.nodered.org/u/jts450)\
**Post date:** [15 June 2022 18:06 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/5 "2022-06-15T18:06:25Z")

</div>

I am not sure how about the question on native nodjs add-ons. I need a working node-red environment, which I have but some of the nodes like [node-red-contrib-modbus (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-modbus)  
require the build tools.

---

<div class="post-metadata">

**Author:** ![jts450](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jts450](https://discourse.nodered.org/u/jts450)\
**Post date:** [15 June 2022 18:10 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/6 "2022-06-15T18:10:54Z")

</div>

Should I be using the latest version of Node-js?

---

<div class="post-metadata">

**Author:** ![jts450](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jts450](https://discourse.nodered.org/u/jts450)\
**Post date:** [15 June 2022 18:11 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/7 "2022-06-15T18:11:41Z")

</div>

I just tried running this command and this is the power shell error I received

Windows PowerShell  
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell [Install PowerShell on Windows, Linux, and macOS - PowerShell | Microsoft Docs](https://aka.ms/pscore6)

PS C:\WINDOWS\system32\> npm install --global windows-build-tools  
npm WARN deprecated har-validator@5.1.5: this library is no longer supported  
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See [There’s Math.random(), and then there’s Math.random() · V8](https://v8.dev/blog/math-random) for details.  
npm WARN deprecated request@2.88.2: request has been deprecated, see [https://github.com/request/request/issues/3142](https://github.com/request/request/issues/3142)  
npm WARN deprecated windows-build-tools@5.2.2: Node.js now includes build tools for Windows. You probably no longer need this tool. See [GitHub - felixrieseberg/windows-build-tools: Install C++ Build Tools for Windows using npm](https://github.com/felixrieseberg/windows-build-tools) for details.  
[##################] - reify:ajv: timing reifyNode:node\_modules/windows-build-tools Completed in 609ms

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [15 June 2022 18:13 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/8 "2022-06-15T18:13:10Z")

</div>

> [@jts450](#):
>
> this is the power shell error I received

I dont see any errors. I see warnings (which as I explained earlier, you should use the nodejs installer but you **could try** the npm package)

If you leave it long enough, it will probably still work.

---

<div class="post-metadata">

**Author:** ![jts450](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jts450](https://discourse.nodered.org/u/jts450)\
**Post date:** [15 June 2022 18:21 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/9 "2022-06-15T18:21:23Z")

</div>

ok right warning. I will try to wait longer or use the nodejs installer and remove Chocolatey I guess.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [15 June 2022 18:35 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/10 "2022-06-15T18:35:35Z")

</div>

> [@jts450](#):
>
> Should I be using the latest version of Node-js?

Yes, the latest LTS version, it comes with build tools so you no longer need to install it separately.

Also, you may not be able to install Node-RED globally if you don't have local admin rights. If so, you may need to install locally. Have a look at my alternate installer on GitHub - you don't need to use it but it gives you the concepts for running locally.

> [@jts450](#):
>
> remove Chocolatey

I never recommend Chocolatey, it just gets in the way and installs things in odd places. Great when it works, a pain when it doesn't.

---

<div class="post-metadata">

**Author:** ![jts450](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jts450](https://discourse.nodered.org/u/jts450)\
**Post date:** [15 June 2022 18:58 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/12 "2022-06-15T18:58:13Z")

</div>

I do have admin rights so I should be able to install Node-RED globally but we have not been able to figure out that part yet.

So are you saying to not remove chocolatey or never install?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [15 June 2022 19:04 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/13 "2022-06-15T19:04:25Z")

</div>

> [@jts450](#):
>
> So are you saying to not remove chocolatey or never install?

🙂 Sorry, just realised my statement wasn't clear and I've corrected it. I never recommend chocolatey. In any case, Windows now has its own package management and you should consider using that if anything. [https://winget.run/](https://winget.run/)

But for Node.js, I just either run the official Windows 64-bit installer or use winget.

- [Node.js](https://nodejs.org/en/download/)
- [winget Node.js](https://winget.run/pkg/OpenJS/NodeJS)
- [winget Node.js LTS](https://winget.run/pkg/OpenJS/NodeJSLTS)

---

<div class="post-metadata">

**Author:** ![jts450](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jts450](https://discourse.nodered.org/u/jts450)\
**Post date:** [15 June 2022 19:23 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/14 "2022-06-15T19:23:56Z")

</div>

Ok so back to my original problem if you are just using the standard node.js installer and do not select Chocolatey how are you installing the windows build tools or are you installing visual studion and pythong separately?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [15 June 2022 19:25 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/15 "2022-06-15T19:25:55Z")

</div>

> [@jts450](#):
>
> how are you installing the windows build tools or are you installing visual studion and pythong separately?

That's what I was saying, you don't need to do that on Windows any more. Just install the official package and it includes the build tools.

---

<div class="post-metadata">

**Author:** ![jts450](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jts450](https://discourse.nodered.org/u/jts450)\
**Post date:** [15 June 2022 19:28 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/16 "2022-06-15T19:28:08Z")

</div>

when was this change made because I have a few machines running node.js version 17.0.1 and for sure on those versions the build tools are not there?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [15 June 2022 19:29 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/17 "2022-06-15T19:29:45Z")

</div>

As you can see, the windows-build-tools package has been deprecated: [windows-build-tools - npm (npmjs.com)](https://www.npmjs.com/package/windows-build-tools). [felixrieseberg/windows-build-tools: Install C++ Build Tools for Windows using npm (github.com)](https://github.com/felixrieseberg/windows-build-tools)

> Please note that the official [Node.js for Windows installer](https://nodejs.org/en/download/) can now automatically install the required tools. That's likely a much better option than the module listed here (`windows-build-tools` ).

Last clean install I did was for a new PC earlier this year with Node.js 16.

---

<div class="post-metadata">

**Author:** ![jts450](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jts450](https://discourse.nodered.org/u/jts450)\
**Post date:** [15 June 2022 19:40 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/18 "2022-06-15T19:40:38Z")

</div>

I donk know what to say other than I do not have the necessary build tools like visual studio and Python on the version I am running?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [15 June 2022 19:47 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/19 "2022-06-15T19:47:11Z")

</div>

I seem to remember that it was an option on the installer. Quite probably by running via Choco if that is what you did, it didn't include the correct command-line options.

Pretty much any install of Python should work anyway, I've used lots of different ones but I now no longer recommend anything but the official Python 3 installer because all of the others including the Windows store, Iron Python, etc all come with issues and baggage that cause various difficulties. Python version management is nearly as painful as Java!

So I think what I would do if I were in your position would be to remove node.js and then install the official Python then reinstall node.js 16 or 18 manually from the official installer. While you shouldn't need to do the Python install, it can be very useful in other things anyway.

---

<div class="post-metadata">

**Author:** ![jts450](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jts450](https://discourse.nodered.org/u/jts450)\
**Post date:** [15 June 2022 21:53 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/20 "2022-06-15T21:53:57Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/e/8e423481892345605397205589c5a578627650a1.png)

I guess I can try reinstalling node.js and install python but will python alone without visual or c/c++ allow me to install nodes like this one without failing to install?

> **[node-red-contrib-modbus](https://flows.nodered.org/node/node-red-contrib-modbus)**
>
> The all in one Modbus TCP and Serial contribution package for Node-RED.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [15 June 2022 23:02 UTC](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982/21 "2022-06-15T23:02:44Z")

</div>

No, you need both. But the tools include Python. It is just if you need other uses of Python that it might be worth installing the full version separately as well.

[Next page](https://discourse.nodered.org/t/installing-node-red-on-work-windows-machine/63982.md?page=2)
