# I can't open the node-red

**URL:** <https://discourse.nodered.org/t/i-cant-open-the-node-red/87135>\
**Category:** General\
**Created:** [10 April 2024 19:03 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135 "2024-04-10T19:03:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ravi-F](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ravi-f/32/90081_2.png) [@Ravi-F](https://discourse.nodered.org/u/Ravi-F)\
**Post date:** [10 April 2024 19:03 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/1 "2024-04-10T19:03:44Z")

</div>

When I start node-red the following message appears:

# ''' Welcome to Node-RED

10 Apr 15:42:59 - [info] Node-RED version: v3.1.8  
10 Apr 15:42:59 - [info] Node.js version: v20.12.2  
10 Apr 15:42:59 - [info] Windows\_NT 10.0.22631 x64 LE  
10 Apr 15:42:59 - [error] Failed to start server:  
10 Apr 15:42:59 - [error] Error: spawn EINVAL  
at ChildProcess.spawn (node:internal/child\_process:421:11)  
at spawn (node:child\_process:761:9)  
at Object.execFile (node:child\_process:351:17)  
at C:\Users\ravi1\AppData\Roaming\npm\node\_modules\node-red\node\_modules@node-red\registry\lib\installer.js:581:27  
at new Promise ()  
at Object.checkPrereq (C:\Users\ravi1\AppData\Roaming\npm\node\_modules\node-red\node\_modules@node-red\registry\lib\installer.js:580:16)  
at Object.load (C:\Users\ravi1\AppData\Roaming\npm\node\_modules\node-red\node\_modules@node-red\registry\lib\index.js:59:22)  
at C:\Users\ravi1\AppData\Roaming\npm\node\_modules\node-red\node\_modules@node-red\runtime\lib\index.js:162:29  
'''

How can i fix this error? 🤔

---

<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:** [10 April 2024 19:12 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/2 "2024-04-10T19:12:58Z")

</div>

Have you installed any nodes recently?

Was it working before?

---

<div class="post-metadata">

**Author:** ![Ravi-F](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ravi-f/32/90081_2.png) [@Ravi-F](https://discourse.nodered.org/u/Ravi-F)\
**Post date:** [10 April 2024 19:14 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/3 "2024-04-10T19:14:37Z")

</div>

It was my first installation, I never used node-red

---

<div class="post-metadata">

**Author:** ![AliAlAli98](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alialali98/32/90085_2.png) [@AliAlAli98](https://discourse.nodered.org/u/AliAlAli98)\
**Post date:** [10 April 2024 21:22 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/4 "2024-04-10T21:22:08Z")

</div>

I have the same problem. first installation.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [10 April 2024 22:03 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/5 "2024-04-10T22:03:07Z")

</div>

Are you installing on Windows too @AliAlAli98 ?

---

<div class="post-metadata">

**Author:** ![AliAlAli98](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alialali98/32/90085_2.png) [@AliAlAli98](https://discourse.nodered.org/u/AliAlAli98)\
**Post date:** [10 April 2024 22:17 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/6 "2024-04-10T22:17:52Z")

</div>

Yes, On windows. I tried installing Node.js 20.12.2 (LTS) version and then tried 18.12.2 (LTS)

---

<div class="post-metadata">

**Author:** ![AliAlAli98](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alialali98/32/90085_2.png) [@AliAlAli98](https://discourse.nodered.org/u/AliAlAli98)\
**Post date:** [10 April 2024 22:18 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/7 "2024-04-10T22:18:28Z")

</div>

Both didn't work

---

<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:** [10 April 2024 22:24 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/8 "2024-04-10T22:24:54Z")

</div>

How did you install node & node-red?

---

<div class="post-metadata">

**Author:** ![mobbarley](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mobbarley](https://discourse.nodered.org/u/mobbarley)\
**Post date:** [11 April 2024 03:39 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/9 "2024-04-11T03:39:01Z")

</div>

Hi, I'm getting the same issue.

Installing on Windows Server 2022 - I've installed on many other windows versions without issue, I'm not sure if this is an issue with this install of Windows or a problem with the current node-red.

I originally installed using

```auto
npm install -g --unsafe-perm node-red

```

and the latest NodeJS v20.

I've since tested using NodeJS v18 and back to early versions of Node-red 3.1 - they all seem to present with the same error. I've also downloaded node-red, extracted, installed manually and hit the same error using:

```auto
npm install
npm start

```

```Welcome
===================

11 Apr 13:31:43 - [info] Node-RED version: v3.1.8
11 Apr 13:31:43 - [info] Node.js version: v18.20.2
11 Apr 13:31:43 - [info] Windows_NT 10.0.20348 x64 LE
11 Apr 13:31:43 - [error] Failed to start server:
11 Apr 13:31:43 - [error] Error: spawn EINVAL
    at ChildProcess.spawn (node:internal/child_process:414:11)
    at spawn (node:child_process:761:9)
    at Object.execFile (node:child_process:351:17)
    at C:\node\node-red\node_modules\@node-red\registry\lib\installer.js:581:27
    at new Promise (<anonymous>)
    at Object.checkPrereq (C:\node\node-red\node_modules\@node-red\registry\lib\installer.js:580:16)
    at Object.load (C:\node\node-red\node_modules\@node-red\registry\lib\index.js:59:22)
    at C:\node\node-red\node_modules\@node-red\runtime\lib\index.js:162:29

```

Additional checks:

- Nothing is using port :1880.
- Running as Administrator
- Windows defender temporarily disabled - no change

---

<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:** [11 April 2024 05:56 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/10 "2024-04-11T05:56:12Z")

</div>

Thanks for the detailed report.

Could I ask a favour before I debug this issue?

Try installing V3.0.2:

```auto
npm install -g --unsafe-perm node-red@3.0.2

```

Does that start up ok?

  

And also V4 beta:

```auto
npm install -g --unsafe-perm node-red@next

```

Does that start up ok?

---

<div class="post-metadata">

**Author:** ![mobbarley](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mobbarley](https://discourse.nodered.org/u/mobbarley)\
**Post date:** [11 April 2024 06:07 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/11 "2024-04-11T06:07:28Z")

</div>

Thanks Steve, I think I have tried each of these. Ive also upgraded to Node.js 20 again.

Here's the output from v4 beta:

```auto

Welcome to Node-RED
===================

11 Apr 16:02:47 - [info] Node-RED version: v4.0.0-beta.2
11 Apr 16:02:47 - [info] Node.js version: v20.12.2
11 Apr 16:02:47 - [info] Windows_NT 10.0.20348 x64 LE
11 Apr 16:02:47 - [error] Failed to start server:
11 Apr 16:02:47 - [error] Error: spawn EINVAL
    at ChildProcess.spawn (node:internal/child_process:421:11)
    at spawn (node:child_process:761:9)
    at Object.execFile (node:child_process:351:17)
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\installer.js:595:27
    at new Promise (<anonymous>)
    at Object.checkPrereq (C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\installer.js:594:16)
    at Object.load (C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\index.js:59:22)
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\runtime\lib\index.js:164:29

```

---

<div class="post-metadata">

**Author:** ![mobbarley](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mobbarley](https://discourse.nodered.org/u/mobbarley)\
**Post date:** [11 April 2024 06:09 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/12 "2024-04-11T06:09:58Z")

</div>

Un-install and re-install with v3.0.2

```auto
c:\Users\Administrator\.node-red>npm install -g --unsafe-perm node-red@3.0.2

added 8 packages, removed 8 packages, and changed 295 packages in 5s

45 packages are looking for funding
  run `npm fund` for details

c:\Users\Administrator\.node-red>node-red
11 Apr 16:09:36 - [info]

Welcome to Node-RED
===================

11 Apr 16:09:36 - [info] Node-RED version: v3.0.2
11 Apr 16:09:36 - [info] Node.js version: v20.12.2
11 Apr 16:09:36 - [info] Windows_NT 10.0.20348 x64 LE
11 Apr 16:09:36 - [error] Failed to start server:
11 Apr 16:09:36 - [error] Error: spawn EINVAL
    at ChildProcess.spawn (node:internal/child_process:421:11)
    at spawn (node:child_process:761:9)
    at Object.execFile (node:child_process:351:17)
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\installer.js:581:27
    at new Promise (<anonymous>)
    at Object.checkPrereq (C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\installer.js:580:16)
    at Object.load (C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\index.js:59:22)
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\runtime\lib\index.js:146:29

c:\Users\Administrator\.node-red>

```

---

<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:** [11 April 2024 06:23 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/13 "2024-04-11T06:23:28Z")

</div>

Most odd. I'm now wondering if this is a windows update or recent nodejs issue. I have installed v3.0.x ~ V4beta on win 11 with node 18 many times without issue.

A bit more info gathering:

- Did you install with
  - an elevated command prompt?
  - Elevated powershell prompt
  - non elevated?

- Does this happen if you launch node-red with
  - an elevated prompt?
  - a non elevated prompt?

---

<div class="post-metadata">

**Author:** ![mobbarley](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mobbarley](https://discourse.nodered.org/u/mobbarley)\
**Post date:** [11 April 2024 06:33 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/14 "2024-04-11T06:33:09Z")

</div>

This is a pretty fresh Server 2022 install, it is not part of a Domain so there won't be any customised group polices etc - I'm logged in as Administrator which is still a local admin.  
I've been running the NodeJS installer and NPM commands as this user, executing the node-red.cmd with "Run as Administrator" makes no difference.

NodeJS was run by just double clicking the installer.  
I'm attempting to remove everything again and perhaps try as a different user.

I also can't see anything obvious in the Windows event logs regarding security etc.

---

<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:** [11 April 2024 06:43 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/15 "2024-04-11T06:43:17Z")

</div>

> [@mobbarley](#):
>
> I'm attempting to remove everything again and

You shouldn't need to uninstall anything but it won't harm either.

> [@mobbarley](#):
>
> perhaps try as a different user

This was going to be my last suggestion but I seen others did not run with account named `Administrator` - worth a shot though.

This is very odd indeed.

In your trials, would you also please try a specific node version: v18.19.0 - I have this on my development machine and it rings node-red without issue.

---

<div class="post-metadata">

**Author:** ![mobbarley](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mobbarley](https://discourse.nodered.org/u/mobbarley)\
**Post date:** [11 April 2024 07:04 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/16 "2024-04-11T07:04:10Z")

</div>

Ok, well now I am up and running.

Here's everything I did in order -

- Uninstall everything possible via NPM
- Remove NodeJS
- Manually delete any NPM folders left laying around
- Let windows update run (I'm now 21H2, was 21H1 previously).
- Reboot & Log in as another user
- Install NodeJS 18.19.0
- Install Node-red 3.0.2.
- Start it

I can only assume that Node or NPM made a mess of things initially and something was always left behind.

---

<div class="post-metadata">

**Author:** ![mobbarley](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mobbarley](https://discourse.nodered.org/u/mobbarley)\
**Post date:** [11 April 2024 07:06 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/17 "2024-04-11T07:06:31Z")

</div>

I've also just run NPM update and node-red 3.1.8 is now starting without issue!

---

<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:** [11 April 2024 07:17 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/18 "2024-04-11T07:17:31Z")

</div>

> [@mobbarley](#):
>
> Install NodeJS 18.19.0

That's the version that works for me. From your posts I guess you used the latest LTS of v20 and v18. I am super curious to know if the latest node version is to blame.

---

<div class="post-metadata">

**Author:** ![AliAlAli98](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alialali98/32/90085_2.png) [@AliAlAli98](https://discourse.nodered.org/u/AliAlAli98)\
**Post date:** [11 April 2024 07:35 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/19 "2024-04-11T07:35:08Z")

</div>

Cna you please specify how did you uninstall everything in NPM? Which prompt did you use? With remove Nodejs, you mean uninstall, right? I am going to repeat your steps, as I have the same issue.

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [11 April 2024 08:01 UTC](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135/20 "2024-04-11T08:01:35Z")

</div>

i tried 18 and 20 both, same problem.  
`Error: spawn EINVAL`

[Next page](https://discourse.nodered.org/t/i-cant-open-the-node-red/87135.md?page=2)
