# Alternate-node-red-installer issues nodeJS v20

**URL:** <https://discourse.nodered.org/t/alternate-node-red-installer-issues-nodejs-v20/89140>\
**Category:** General\
**Tags:** alternate-node-red-installer\
**Created:** [1 July 2024 08:38 UTC](https://discourse.nodered.org/t/alternate-node-red-installer-issues-nodejs-v20/89140 "2024-07-01T08:38:46Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![KarolisL](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@KarolisL](https://discourse.nodered.org/u/KarolisL)\
**Post date:** [1 July 2024 08:38 UTC](https://discourse.nodered.org/t/alternate-node-red-installer-issues-nodejs-v20/89140/1 "2024-07-01T08:38:46Z")

</div>

Hello, @TotallyInformation just wanted to inform that after nodejs V20 update your alternate installer is not available:  
Issue created: [unable to install nodered v4 · Issue #11 · TotallyInformation/alternate-node-red-installer · GitHub](https://github.com/TotallyInformation/alternate-node-red-installer/issues/11#issue-2383110254)

---

<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:** [1 July 2024 09:17 UTC](https://discourse.nodered.org/t/alternate-node-red-installer-issues-nodejs-v20/89140/2 "2024-07-01T09:17:08Z")

</div>

Thanks for letting me know. I'll see if I can update it.

---

<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:** [1 July 2024 09:30 UTC](https://discourse.nodered.org/t/alternate-node-red-installer-issues-nodejs-v20/89140/3 "2024-07-01T09:30:07Z")

</div>

The dependency comes from the `replace-in-file` package. Unfortunately, the latest version (v8) has some massive breaking changes in it. So I will try updating to v7 to see if that improves things at least.

However, the issues you highlighted should not prevent its installation. They are only warnings not errors.

---

<div class="post-metadata">

**Author:** ![KarolisL](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@KarolisL](https://discourse.nodered.org/u/KarolisL)\
**Post date:** [1 July 2024 09:34 UTC](https://discourse.nodered.org/t/alternate-node-red-installer-issues-nodejs-v20/89140/4 "2024-07-01T09:34:45Z")

</div>

Well I tried to install it on my clean PC.

Result I've got:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/9/091c61025bdb3e22812b05f8fd740a24c469d6f3.png)

alternate-node-red installer is not recognized...

After using alternate installer for few years it is the first time I see this issue, and it happened after I updated to nodeJs v20, so I automatically assumed it was an issue

---

<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:** [1 July 2024 11:25 UTC](https://discourse.nodered.org/t/alternate-node-red-installer-issues-nodejs-v20/89140/5 "2024-07-01T11:25:04Z")

</div>

OK, looks like I need to change my node.js version. I've been still using v18 as this is the min version for node-red v4 and uibuilder v7.

I am still checking what the issues are. But as I say, unfortunately, getting past the `glob` warning is going to require a redevelopment. May take me some time.

Thankfully, the workaround is easy while you are waiting.

1. Create a new folder
2. Install node-red into that folder.
3. Add this to the package.json in that folder: `"start": "node node_modules/node-red/red.js --userDir ./data",`
4. Create a `data` sub-folder.
5. Start node-red with `npm start`

---

<div class="post-metadata">

**Author:** ![KarolisL](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@KarolisL](https://discourse.nodered.org/u/KarolisL)\
**Post date:** [1 July 2024 15:14 UTC](https://discourse.nodered.org/t/alternate-node-red-installer-issues-nodejs-v20/89140/6 "2024-07-01T15:14:15Z")

</div>

> [@TotallyInformation](#):
>
> Install node-red into that folder.

what am I missing? I've always used alternate installer to handle multiple instances. I've tried searching in forum where main response is "drop -g tag" but I don't get any node\_modules files in my created directory, only global ones are updated  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/c/fc0975d7a36398c909dda95b6698e0a5432f9299.png)

---

<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:** [1 July 2024 15:23 UTC](https://discourse.nodered.org/t/alternate-node-red-installer-issues-nodejs-v20/89140/7 "2024-07-01T15:23:38Z")

</div>

~~Well that's odd. I wonder if something changed in a recent npm update.~~

Sorry, realised I missed a step. You need to do a `npm init -y` in the project folder before installing Node-RED otherwise it picks up your global install anyway. I tend to forget that because I never install it globally.

Also, best to install node red with `npm install node-red --production --unsafe-perm`

---

<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:** [1 July 2024 15:39 UTC](https://discourse.nodered.org/t/alternate-node-red-installer-issues-nodejs-v20/89140/8 "2024-07-01T15:39:05Z")

</div>

OK, so I just installed the latest node.js v20 on my Windows 11 PC. Uninstalled the alt installer and tried to install again.

With the result that it all worked fine:

```auto
C:\src\alternate-node-red-installer [(master)]
> npm install -g alternate-node-red-installer
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

added 62 packages, and changed 1 package in 3s

18 packages are looking for funding
  run `npm fund` for details
C:\src\alternate-node-red-installer [(master)]
> nrinstall
Usage: -f <root-folder-name>

Options:
      --help Show help [boolean]
      --version Show version number [boolean]
  -f, --folder Root folder, Node-RED will be installed here
                                                             [string] [required]
      --no-color Turn off ANSI color output [boolean]

Missing required argument: f
C:\src\alternate-node-red-installer [(master)]
>

```

Tried an actual install as well and got the expected outputs:

```auto
C:\src
> mkdir nrtest1

    Directory: C:\src

Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 01/07/2024 16:40 nrtest1

C:\src
> nrinstall -f nrtest1
⠋ InstallingReplaced "<root-folder-name>" with C:\src\nrtest1 [
  { file: 'C:/src/nrtest1/system/node-red.service', hasChanged: true }
]
{ folder: 'C:\\src\\nrtest1' }
Replaced "<root-folder-name>" with C:\src\nrtest1 [{ file: 'C:/src/nrtest1/data/envfile.ini', hasChanged: true }]
⠏ Installing
   ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
   │ │
   │ Alternate Installer for Node-RED │
   │ │
   │ Root Folder . . : C:\src\nrtest1 │
   │ Templates Folder: C:\Users\julia\AppData\Roaming\npm\node_modules\alternate-node-red-installer\templates │
   │ │
   │ Copied template master folder from templates to root folder: C:\src\nrtest1 │
   │ Copied template data (userDir) folder to C:\src\nrtest1\data │
   │ Node-RED v4.0.1 successfully installed │
   │ Copied master settings.js │
   │ Check `example-settings.js` if you want an enhanced settings file. │
   │ │
   │ │
   ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

NPM COMMAND OUTPUT

added 312 packages, and audited 313 packages in 16s

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

found 0 vulnerabilities

NPM COMMAND ERROR OUTPUT
npm warn config production Use `--omit=dev` instead.

C:\src
>

```

---

<div class="post-metadata">

**Author:** ![KarolisL](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@KarolisL](https://discourse.nodered.org/u/KarolisL)\
**Post date:** [1 July 2024 15:41 UTC](https://discourse.nodered.org/t/alternate-node-red-installer-issues-nodejs-v20/89140/9 "2024-07-01T15:41:32Z")

</div>

> [@TotallyInformation](#):
>
> "start": "node node\_modules/node-red/red.js --userDir ./data"

For future me (and others):

1. Create a new folder
2. `npm init -y`
3. Install node-red into that folder `npm install node-red --production --unsafe-perm`.
4. Add this to the package.json in that folder: `"start": "node node_modules/node-red/red.js --userDir ./data",`
5. Create a `data` sub-folder.
6. Start node-red with `npm start`

---

<div class="post-metadata">

**Author:** ![KarolisL](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@KarolisL](https://discourse.nodered.org/u/KarolisL)\
**Post date:** [1 July 2024 15:59 UTC](https://discourse.nodered.org/t/alternate-node-red-installer-issues-nodejs-v20/89140/10 "2024-07-01T15:59:55Z")

</div>

I believe issue is with company policy changes (the only way I can explain it) tried to run it on 2 different company PC without success. Got same result as you've shown on my personal PC.

Bad assumption from my part, at least learned to create multiple instances manually

---

<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:** [1 July 2024 20:20 UTC](https://discourse.nodered.org/t/alternate-node-red-installer-issues-nodejs-v20/89140/11 "2024-07-01T20:20:07Z")

</div>

No worries. Maybe just keep the package for reference as it has a few other enhancements as well. Though they probably don't generally apply for local dev environments.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [15 July 2024 20:20 UTC](https://discourse.nodered.org/t/alternate-node-red-installer-issues-nodejs-v20/89140/12 "2024-07-15T20:20:38Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
