Problems Installing NodeRED

Just trying to install Node red for the first time. The last time I did any programming was a BASIC course in 1986. I did OK but remember nothing 37 years later. Previous to that, I blown out of a Fortran course in 1976. This looks to be just as challenging.

So far, I've been sent all over the internet to download things. The latest was this. I don't even know what it is or what it does, but I followed instructions and used Powershell to install something (npm?).
After that I ran NodeRED from the command prompt in Powershell with the following result. Something can't be loaded because something else is wrong. I visited the Microsoft page about Execution Policies and don't see anything about how to fix things on my computer.

Please, I could use some help. I'd hate to think I'm already dead in the water on Step 2 on my first day.

Thanks in advance,
Ken

PS C:\Users\ve3hl> npm install -g --unsafe-perm node-red

added 292 packages in 12s

40 packages are looking for funding
run npm fund for details
npm notice
npm notice New minor version of npm available! 9.5.0 -> 9.6.2
npm notice Changelog: Release v9.6.2 · npm/cli · GitHub
npm notice Run npm install -g npm@9.6.2 to update!
npm notice
PS C:\Users\ve3hl> node-red
node-red : File C:\Users\ve3hl\AppData\Roaming\npm\node-red.ps1
cannot be loaded because running scripts is disabled on this system.
For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1

  • node-red
  •   + CategoryInfo          : SecurityError: (:) [], PSSecurityExcept
     ion
      + FullyQualifiedErrorId : UnauthorizedAccess

OK, so you have fallen foul of Microsoft's security policies for PowerShell.

You've a couple of choices. Use an old-fashioned CMD prompt instead of PowerShell Or change the execution policy for PowerShell.

Using cmd is probably easiest if you aren't used to PowerShell.

So click the windows menu and start typing cmd. You should be offered the "Command Prompt". You can run node-red from there.

If it tells you it can't find the node-red command, you will probably need to log out and back in again so that the path's catch up (or you can reboot).

Many thanks! cmd worked as you said.

Only I don't understand where the graphical interface is, where I drag and drop things to create a 'flow'. I went back to my browser and entered 'node-red' and it took me to the main website, not the interface. Maybe without the hyphen? No, that goes back to the website as well...

Thanks again,

Ken

I know it is simple, buy did you try http://localhost:1880 for the editor?

To get something on the web page you need http://localhost:1880/ui if you have node-red-dashboard installed using Manage Palette?

Sorry, neither of those worked.

Manage Palette? What's that?

Hi @Ken-ve3hls

When you run the node-red command, you should get some output similar to the following:

    24 Mar 09:55:01 - [info] Settings file  : /Users/nol/.node-red/settings.js
    24 Mar 09:55:01 - [info] Context store  : 'default' [module=memory]
    24 Mar 09:55:01 - [info] Context store  : 'file' [module=localfilesystem]
    24 Mar 09:55:01 - [info] User directory : /Users/nol/.node-red
    24 Mar 09:55:01 - [info] Projects directory: /Users/nol/.node-red/projects
    24 Mar 09:55:01 - [info] Server now running at http://127.0.0.1:1880/
    24 Mar 09:55:01 - [info] Active project : SubflowContext
    24 Mar 09:55:01 - [info] Flows file     : /Users/nol/.node-red/projects/SubflowContext/flows.json
    24 Mar 09:55:01 - [warn] Using unencrypted credentials
    24 Mar 09:55:01 - [info] Starting flows
    24 Mar 09:55:01 - [info] Started flows

Assuming you have got that, then Node-RED is now running. Note the line Server now running at http://127.0.0.0:1880/ - that is the url you should use to access the editor in your browser.

http://127.0.0.:1880/
I think you may have an extra 'dot' in the URL.

Should be... http://127.0.0:1880/

Fixed - although my point was more to refer the url provided in the actual log output.

Another correction, sorry!

Server now running at http://127.0.0.1:1880/

(cross posted.)

Also I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

Many thanks!

Just waking up now. i'll give it a try after breakfast.

Ken

That did it! Thanks a million!

Will it always be at that URL, or do I have to run that command line thing to find out where it is?

Ken

It will always be at that URL if Node-RED is running.

do I have to run that command line thing to find out where it is?

That command is how you run Node-RED.

Understood, thanks, but forgive me for saying that's a strange way to run a piece of software in 2023. Haven't gone near a DOS prompt in nearly 40 years..

Ken

Node-RED is more of a background service than a desktop application.

If you want it always running, our docs describe how to do that for Windows here: Running on Windows : Node-RED

I'm inclined to agree, its oddly difficult to install Node-red on Windows.

Maybe the process is not unusually opaque for those used to installing server software but if you are expecting Windows' "click install, confirm, everything is done for you" process it's baffling.

I don't suppose it's any comfort but if you were installing on Linux there is a one line command to install and automatically startup Node-red. (try a Raspberry Pi or an old thin client PC with Linux)
A much more friendly and reassuring introduction to the language!

Has there ever been an initiative to create an installer script (e.g. with Inno Setup) to make life easier for people trying to run Node-RED on Windows?

Thanks again Nick! Much appreciated!

Ken

In my experience, 1 click Linux installation would make it the only such thing in existance! I have a severe allergy to Linux and won't be trying it, thanks.

Ken

The usual response to that is "It's open source. You can do it yourself". :stuck_out_tongue_winking_eye:

Ken