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 email@example.com, firstname.lastname@example.org. 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.
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?
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?
It displays this path: C:\Users\Lock (admin)\AppData\Roaming\npm
and email@example.com, firstname.lastname@example.org.
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.
npm and nodejs are separate applications. npm is normally installed as part of the nodejs installation.
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.
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; and I should do that installation before "npm install -g --unsafe-perm node-red"?
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.
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
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.
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.