# Node-Red Installation Issue

**URL:** <https://discourse.nodered.org/t/node-red-installation-issue/82442>\
**Category:** General\
**Created:** [29 October 2023 12:21 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442 "2023-10-29T12:21:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [29 October 2023 12:21 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/1 "2023-10-29T12:21:29Z")

</div>

I currently have Node-Red running on 2 PC's one version I access via the localhost, the other I access over the local network.

The localhost Dashboard version does not respond to Right-Mouse clicks (no popup window), the network Dashboard does respond to Right-Mouse clicks opening the popup window for editing.  
The localhost Dashboard version is v2.1.3, the network Dashboard version is v3.0.2.

Both PC's have an Admin account, and a Standard account; for both PC's the npm folder is in the Admin account (Roaming folder), and the .Node-Red folder is in the Standard account (where I do most of my work).

As a quick test, and after renaming the npm folder on the localhost PC, I copied the npm folder from the network PC to the localhost PC; it did not make any difference to the Dashboard version, or the Right-Mouse key function.

I wanted to run "npm rebuild"; the documentation refers to running it in the proper folder and references the Node-Red folder (~/.node-red); but, it also says to check where the installation is located (npm list -g --depth 0). That returns the Admin Roaming "npm" folder and node-red@3.0.2, npm@9.6.0. These versions are clearly because I copied the network PC folder to the localhost PC, but again the version is not reflected in the Dashboard and the Right-Mouse key does not bring up the popup editing window..

Should I try running "npm rebuild" at the Admin Roaming folder location of the "npm" folder on the localhost (not sure why the documentation refers to the "~/.node-red" folder)? My objective is to get the Right-Mouse function working on the localhost PC.

Thanks, X.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 October 2023 12:41 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/2 "2023-10-29T12:41:15Z")

</div>

> [@xytsrm](#):
>
> I currently have Node-Red running on 2 PC's

What OS are you running?

> [@xytsrm](#):
>
> the npm folder is in the Admin account

What do you mean by the npm folder?

> [@xytsrm](#):
>
> I wanted to run "npm rebuild"; the documentation refers to running it in the proper folder and references the Node-Red folder (~/.node-red)

If you need to run npm rebuild then you should do it from the .node-red folder.

> [@xytsrm](#):
>
> the version is not reflected in the Dashboard

When you say dashboard do you mean the node-red editing window or the node-red-dashboard display. What version do you expect to see there and where are you looking?

> [@xytsrm](#):
>
> Should I try running "npm rebuild" at the Admin Roaming folder location of the "npm" folder

You do not need to run npm rebuild unless you have updated nodejs. If you do run it then do it from the .node-red folder, where the flows file is located.

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [29 October 2023 13:14 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/3 "2023-10-29T13:14:10Z")

</div>

Hi Colin,

- OS Is Windows 10
- Path to npm: C:\Users\Lock (admin)\AppData\Roaming\npm
- Standard Account Node-Red path: C:\Users\Lock.node-red (where I do most of my work)
- But there is also an Admin Node-Red folder: C:\Users\Lock (admin).node-red (I have some test flows there, but it's not where I do most of my work)
- Dashboard version at the bottom:  
 ![Nod-Red Version](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/e/dea4868e8d947aeaf13106ddefae4702bfb911f4.jpeg)

If npm rebuild should be run from the flows folder (.Node-Red) should I do it to both the Admin location and the standard location. Also why does the documentation say run npm list -g --depth 0 to find the folder when it only finds the npm folder?

X.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 October 2023 13:21 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/4 "2023-10-29T13:21:30Z")

</div>

> [@xytsrm](#):
>
> Dashboard version at the bottom:

That is not the dashboard version, that is the node-red version.

> [@xytsrm](#):
>
> If npm rebuild should be run from the flows folder (.Node-Red) should I do it to both the Admin location and the standard location

Why do you want to run npm rebuild?  
If you do need to run it then do it from both.

> [@xytsrm](#):
>
> why does the documentation say run npm list -g --depth 0 to find the folder when it only finds the npm folder?

What documentation?

If you are trying to upgrade node-red to the latest version, then what you need to do depends on how you installed node-red initially.

As for the right click not working, what browser are you using and can you try a different browser?

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [29 October 2023 13:29 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/5 "2023-10-29T13:29:12Z")

</div>

Documentation that refers to npm rebuild: [Supported Node versions : Node-RED](https://nodered.org/docs/faq/node-versions)

I'm using the same browser for the both PC's the localhost PC and the network PC: the version of Node-Red on the network PC is v3.0.2 and the Right-Mouse popup works, the localhost PC Node-Red version is v2.1.3 and the Right-Click Popup window does not function.

Given that as I'm using the same browser for both, it's not the browser; my working hypothesis is that it's the older version of Node-Red on the localhost PC that's causing the issue.

Will running npm rebuild upgrade to the latest Node-Red version; in fact what is the latest version?

X.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 October 2023 13:55 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/6 "2023-10-29T13:55:00Z")

</div>

> [@xytsrm](#):
>
> Documentation that refers to npm rebuild: [Supported Node versions : Node-RED](https://nodered.org/docs/faq/node-versions)

OK, perhaps you should do that if you have upgraded nodejs. Have you upgraded nodejs?  
What does `npm list -g --depth 0` show?

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [29 October 2023 14:03 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/7 "2023-10-29T14:03:57Z")

</div>

> [@xytsrm](#):
>
> C:\Users\Lock (admin)\AppData\Roaming\npm

It displays this path: C:\Users\Lock (admin)\AppData\Roaming\npm  
and node-red@3.0.2, npm@9.6.0.

I have not performed any npm upgrade.  
However, remember I simply copied the npm folder from the network PC to the localhost PC so it's reflecting the versions that are on the network PC. Not sure if that qualifies as a true Node.js upgrade. The server seems to run normally, but Node-Red is still the old version and the Right-Mouse key still does not function. NOTE: I saved the original localhost npm folder, in case I needed to restore it.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 October 2023 14:07 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/8 "2023-10-29T14:07:27Z")

</div>

> [@xytsrm](#):
>
> I have not performed any npm upgrade.

npm and nodejs are separate applications. npm is normally installed as part of the nodejs installation.

> [@xytsrm](#):
>
> I saved the original localhost npm folder, in case I needed to restore it.

It is a bad idea to try and manipulate folders relating to npm manually. I suggest restoring the original folder, rebooting, and then upgrading node-red by re-installing it using the command  
`npm install -g --unsafe-perm node-red`  
Then restart nodered.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 October 2023 14:09 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/9 "2023-10-29T14:09:11Z")

</div>

Note that you need at least nodejs version 14 installed (preferably version 18). You can check that using  
`node -v`

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [29 October 2023 14:15 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/10 "2023-10-29T14:15:42Z")

</div>

I must admit, while I have quite extensive knowledge of Windows PC's, using Win32 and various installations; but I still have not wrapped my head around the Node-Red structure. It's a difference animal altogether; so you'll need to excuse my ignorance.

I assume I should run "npm install -g --unsafe-perm node-red" at both Node-Red folders (Admin & Standard)?

I see that Node.js 20.9.0 is the lastest recommended: [Node.js](https://nodejs.org/en); and I should do that installation before "npm install -g --unsafe-perm node-red"?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 October 2023 14:17 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/11 "2023-10-29T14:17:40Z")

</div>

> [@xytsrm](#):
>
> I assume I should run "npm install -g --unsafe-perm node-red" at both Node-Red folders (Admin & Standard)?

No, the -g means global. There is only one installed version of node red when installed this way. Just the same as you only have one installed version of MS Word, but can have documents in many folders, so you can have flows setup in multiple folders.

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [29 October 2023 14:19 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/12 "2023-10-29T14:19:01Z")

</div>

I see that Node.js 20.9.0 is the lastest recommended: [Node.js](https://nodejs.org/en); and I should do that installation before "npm install -g --unsafe-perm node-red"?

node -v = v14.18.1

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 October 2023 14:23 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/13 "2023-10-29T14:23:28Z")

</div>

Yes. Do that as described in the node red docs, [running on Windows](https://nodered.org/docs/getting-started/windows). Make sure the box to install the build tools is checked when you get to that point in the nodejs install.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 October 2023 14:24 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/14 "2023-10-29T14:24:16Z")

</div>

> [@xytsrm](#):
>
> node -v = v14.18.1

In that case it is not essential to upgrade nodejs, but I suggest you do anyway as 14 is out of support.

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [29 October 2023 14:26 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/15 "2023-10-29T14:26:51Z")

</div>

I'll restore the original npm folder, restart and then do the Node.js installation.

Then I'll ask you for the relationship between: Node.js, npm & Node-Red 😉

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [29 October 2023 15:07 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/16 "2023-10-29T15:07:08Z")

</div>

Hi Colin,

Looks like everything worked I now have Node-Red v3.1.0 & I have the context menus.

Thanks for the help.

Now just what is the relationship between Node.js, npm and Node-Red?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 October 2023 15:18 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/17 "2023-10-29T15:18:05Z")

</div>

Simplifying, nodejs is an application that interprets and runs javascript.

Node-red is a set of javascript packages that are interpreted and run by nodejs. When you run node-red you are actually starting nodejs, pointing to node-red, which itself interprets your flow.

npm is a tool that is used for installing javascript packages such as node-red and contributed nodes.

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [29 October 2023 15:45 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/18 "2023-10-29T15:45:40Z")

</div>

Got it, thanks.  
BTW: While Java-Script is certainly preferred for web applications, my personal preference is Python. One of the frustrating aspects of Java-Script is that it launches multiple instances of a function. For example it I use setInterval, or setTimeout thinking I can run one followed by a second in a Function Node. Rather than a sequential flow, two instances are launched and they are executed simultaneously. There is no function that can be used to execute a sequence of operations in order in a Function-Node; at least that I know about

I have found a link to install a Python based Function-Node; [node-red-contrib-python-function (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-python-function).  
Do you have any familiarity with this node?

X.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 October 2023 16:10 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/19 "2023-10-29T16:10:50Z")

</div>

> [@xytsrm](#):
>
> One of the frustrating aspects of Java-Script is that it launches multiple instances of a function. For example it I use setInterval, or setTimeout thinking I can run one followed by a second in a Function Node. Rather than a sequential flow, two instances are launched and they are executed simultaneously.

That is only true for asynchronous operations. setInterval() and setTimeout() each start an asynchronous operation. In your example, setInterval() and setTimeout() are, in fact, called sequentially. It is the asynchronous operations that carry on in parallel.

> [@xytsrm](#):
>
> There is no function that can be used to execute a sequence of operations in order in a Function-Node; at least that I know about

Indeed that is possible, but it is quite complex. Research asynchronous functions in javascript if you want to find how to do it, look for `await`. However, this is rarely necessary in node-red. Often, if you find yourself using asynchronous functions, such as setInterval, it means that there are better ways to solve the problem using the low-code features of node-red. Tell us more about the requirement where you find yourself doing this.

> [@xytsrm](#):
>
> I have found a link to install a Python based Function-Node; [node-red-contrib-python-function (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-python-function).

The only experience that I have of this is seeing users trying to use the node and asking for help here due to problems with the node. if you have existing code in python that you must use in node-red the easiest way is to use an exec node to execute the python outside the node-red environment.

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [29 October 2023 16:39 UTC](https://discourse.nodered.org/t/node-red-installation-issue/82442/20 "2023-10-29T16:39:00Z")

</div>

Actually, I use the exec node extensively; what I wanted was to execute certain functions sequentially within a function-node; a function-node using python would allow sequential operations.

It's not really a deal breaker; as there are conventional nodes I could use, it just might be a bit cleaner with a python function-node.

I find Node-Red an amazing technology, especially when combined with MQTT. It's amazing that IBM developed both in the 1990's and they're gaining new popularity now.

Thanks again for all your help, and patience 🙂

X.

[Next page](https://discourse.nodered.org/t/node-red-installation-issue/82442.md?page=2)
