# I cant Install any nodes in embedded node-red

**URL:** <https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791>\
**Category:** General\
**Created:** [1 March 2021 09:38 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791 "2021-03-01T09:38:19Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)\
**Post date:** [1 March 2021 09:38 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/1 "2021-03-01T09:38:19Z")

</div>

hi please i need some help  
I use this template

> **[GitHub - sbarwe/node-red-template-embedded: A template project for running...](https://github.com/sbarwe/node-red-template-embedded)**
>
> A template project for running Node-Red in "embedded" mode which is great if you want to run multiple instances of Node-Red or work collaboratively with others. - GitHub - sbarwe/node-red...

installed with

```auto
# Create a project folder and change into it
mkdir myproject && cd myproject
# Clone this repository into the project folder
git clone https://github.com/sbarwe/node-red-template-embedded.git .
# Install the pre-requisite modules (Express, Node-Red)
npm install
# Install some additional nodes if required ...
#npm install node-red-contrib-xx node-red-contrib-yy --save
# Start the server (runs 'node server.js')
npm start

```

but when install any new nods from manage palette I see Error msg  
but log in the debug mode

```auto
03/01/21, 10:14:14 [info] Installing module: node-red-dashboard, version: 2.28.1
03/01/21, 10:14:14 [debug] npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-dashboard@2.28.1
03/01/21, 10:14:24 [debug] [out] + node-red-dashboard@2.28.1
03/01/21, 10:14:24 [debug] [out] updated 1 package in 4.677s
03/01/21, 10:14:24 [debug] rc=0
03/01/21, 10:14:24 [info] Installed module: node-red-dashboard

```

so I back to guide

> # Installing Node-Red nodes
> 
> Node-Red nodes are installed as npm modules. With this project template, you have two options when installing new nodes.
> 
> 1. Project LevelMake sure you are in the main project folder and install using `npm` as usual. Update your main project `package.json` file (or use `npm --save` ).This is the simplest approach and the one I use. However, it does mean that, if you want to run another node-red instance from the same project folder, you have to use the same installed modules.
> 2. User LevelChange into your user folder ( `./.nodered` by default) before using `npm` . You will need to do an `npm init -y` the first time as I haven't included a `package.json` file in that folder.This seems to me to be more complex to manage. However, it does have the advantage that you can use the project (optionally with some shared nodes installed) with multiple instances each with their own nodes or different versions of the same nodes.
> 3. Developing node-red nodesIf you use the setup to isolate the development of a node-red node you should use `npm link` to link and install to and from your original development directory (e.g. a seperate git-repository). Use `npm run dev` to start the node-red instance with debugging features. See [npm scripts](https://github.com/sbarwe/node-red-template-embedded#npm-scripts) for more information.

any help

---

<div class="post-metadata">

**Author:** ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)\
**Post date:** [1 March 2021 13:18 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/2 "2021-03-01T13:18:41Z")

</div>

so i switched to another way  
[https://nodered.org/docs/user-guide/runtime/embedding](https://nodered.org/docs/user-guide/runtime/embedding)

but same issuse i cant add anything - node-red events log :

```auto
2021-03-01T13:15:11.607Z Install : node-red-dashboard 2.28.1

2021-03-01T13:15:11.654Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-dashboard@2.28.1
2021-03-01T13:15:12.816Z [err] Debugger attached.
2021-03-01T13:15:27.167Z [err] npm 
2021-03-01T13:15:27.167Z [err] WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
2021-03-01T13:15:29.120Z [out] + node-red-dashboard@2.28.1
2021-03-01T13:15:29.120Z [out] updated 1 package in 9.783s
2021-03-01T13:15:29.136Z [err] Waiting for the d
2021-03-01T13:15:29.136Z [err] ebugger to disconnect...
2021-03-01T13:15:29.235Z rc=0
-----------------------------------------------------------
2021-03-01T13:27:54.760Z Install : node-red-contrib-ui-svg 2.2.1

2021-03-01T13:27:54.767Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-contrib-ui-svg@2.2.1
2021-03-01T13:27:55.797Z [err] Debugger attached.
2021-03-01T13:28:07.584Z [out] + node-red-contrib-ui-svg@2.2.1
2021-03-01T13:28:07.584Z [out] added 28 packages from 28 contributors in 10.345s
2021-03-01T13:28:07.630Z rc=0

```

and for node-red debug in terminal:

```auto
03/01/21, 14:07:01	[info] Starting flows
03/01/21, 14:07:01	[info] Started flows
03/01/21, 14:08:36	[info] Installing module: node-red-dashboard, version: 2.28.1
03/01/21, 14:09:03	[info] Installed module: node-red-dashboard
03/01/21, 14:27:54 - [info] Installing module: node-red-contrib-ui-svg, version: 2.2.1
03/01/21, 14:28:07 - [info] Installed module: node-red-contrib-ui-svg

```

but cant show installed nodes in node-red dashboard  
what problems

---

<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:** [1 March 2021 13:38 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/3 "2021-03-01T13:38:35Z")

</div>

> [@d0d04m3](#):
>
> `2021-03-01T13:15:29.120Z [out] + node-red-dashboard@2.28.1`

It has installed ok. Try refreshing the browser window.

---

<div class="post-metadata">

**Author:** ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)\
**Post date:** [1 March 2021 13:48 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/4 "2021-03-01T13:48:12Z")

</div>

thanks to replay  
but i checked and restart server and nothing

 ![Untitled](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/7/379eb68db34c428e1cb383bd3dc5b95fae6ab69a.png)

 ![image_2021-03-01_145231](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/8/78f42ad98cd55e901e63fef5ddf90d0b37de191a.png)

---

<div class="post-metadata">

**Author:** ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)\
**Post date:** [1 March 2021 15:37 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/5 "2021-03-01T15:37:51Z")

</div>

when check this file .config.json  
I Discovred all installed new nodes its missing in this config file whay not add it Automaticaly!  
so I add it manualy but not work again, Issus no solved

```auto
"node-red-contrib-ui-svg": {
        "name": "node-red-contrib-ui-svg",
        "version": "1.3.0",
        "local": true,
        "nodes": {
            "ui_svg_graphics": {
                "name": "ui_svg_graphics",
                "types": [
                    "ui_svg_graphics"
                ],
                "enabled": true,
                "local": true,
                "module": "node-red-contrib-ui-svg",
                "file": "D:\\Project\\node-red-template-embedded\\.nodered\\node_modules\\node-red-contrib-ui-svg\\svg_graphics.js"
            }
        }
    },

```

so i check the config file one more and all my new line code its deleted  
whay when Start node-red server its delete my new config and back to Defautl config whay this !

---

<div class="post-metadata">

**Author:** ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)\
**Post date:** [1 March 2021 18:52 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/6 "2021-03-01T18:52:51Z")

</div>

ok I updated some IDs  
i installed nodes with npm cmd

```auto
cd $poject/.nodered
npm install <npm-package-name>

```

Installed package but anything in dashboard

```auto
cd $poject/.nodered
npm install <npm-package-name> --save

```

Installed package but anything in dashboard

so i changed PATH and last cmd its:

```auto
cd $poject/
npm install <npm-package-name> --save

```

its works

so i changed prefex into installer.js

```auto
D:\Project\node-red-template-embedded\node_modules\@node-red\registry\lib\installer.js
prefix=~
to 
D:\Project\node-red-template-embedded\node_modules\
var args = ['install','--no-audit','--no-update-notifier','--no-fund','--save','--save-prefix=D:\\Project\\node-red-template-embedded','--production',installName];

```

and start node-red server  
install new package to test  
but show MSG Error Log in dashboard  
so restart server and load dashboard if any change  
but nothing changed issus is still I cant show new installed package in dashboard  
else installed manually from CLI  
any id to resolve this please

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [2 March 2021 13:47 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/7 "2021-03-02T13:47:24Z")

</div>

> [@d0d04m3](#):
>
> whay when Start node-red server its delete my new config and back to Defautl config whay this !

The `.config.nodes.json` (or `.config.json` if you are on an old version of NR) file is **not** a file you edit. It contains a record of what the runtime has found when loading the palette of nodes.

I can't immediately see why this isn't working for you. I know you've just raised an issue against Node-RED for this - but this is not a core issue. If anything, it will be an issue with the template you are starting with.

Is there a reason you are using that template rather than doing a normal install of Node-RED?

---

<div class="post-metadata">

**Author:** ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)\
**Post date:** [2 March 2021 14:10 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/8 "2021-03-02T14:10:40Z")

</div>

normal Node-red dont have any Issus  
but when I use Embended node-red I cant Show any nodes Installed in my Edito node-red

> so i switched to another way  
> [Embedding into an existing app : Node-RED](https://nodered.org/docs/user-guide/runtime/embedding)
> 
> but same issuse i cant add anything - node-red events log Error

and worked for me only with this way

> so i changed PATH and last cmd its:
> 
> ```auto
> cd $poject/
> npm install <npm-package-name> --save
> 
> ```
> 
> its works
> 
> so i changed prefex into installer.js
> 
> ```auto
> D:\Project\node-red-template-embedded\node_modules\@node-red\registry\lib\installer.js
> prefix=~
> to 
> D:\Project\node-red-template-embedded\node_modules\
> var args = ['install','--no-audit','--no-update-notifier','--no-fund','--save','--save-prefix=D:\\Project\\node-red-template-embedded','--production',installName];
> 
> ```
> 
> and start node-red server  
> install new package to test  
> but show MSG Error Log in dashboard  
> so restart server and load dashboard if any change  
> but nothing changed issus is still I cant show new installed package in dashboard  
> else installed manually from CLI  
> any id to resolve this please

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [7 March 2021 22:12 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/9 "2021-03-07T22:12:16Z")

</div>

Potentially the same OP asking on Stack Overflow?

> <https://stackoverflow.com/questions/66515932/cant-install-new-nods-in-embed-node-red>

Looking at the code, I can't see how we can get from the `rc=0` to a promise rejection and a failure message.

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [8 March 2021 10:40 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/10 "2021-03-08T10:40:34Z")

</div>

Please run the following 2 tests:

1. Use the full path to the userDir in the settings object: `D:\\Project\\node-red-template-embedded\\hhh`
2. Use just `hhh` without the leading `./`

I think this might be a windows path joining issue in the `loadNodeFiles()`

---

<div class="post-metadata">

**Author:** ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)\
**Post date:** [8 March 2021 10:56 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/11 "2021-03-08T10:56:33Z")

</div>

wow its works  
very thanks man

> 1. Use the full path to the userDir in the settings object: `D:\\Project\\node-red-template-embedded\\hhh`

worked

> 1. Use just `hhh` without the leading `./`

not working

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [8 March 2021 11:08 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/12 "2021-03-08T11:08:24Z")

</div>

One more test please

- userDir as `".\\hhh"`

---

<div class="post-metadata">

**Author:** ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)\
**Post date:** [8 March 2021 11:12 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/13 "2021-03-08T11:12:33Z")

</div>

not work with

```auto
".\\hhh"

```

---

<div class="post-metadata">

**Author:** ![d0d04m3](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/d0d04m3/32/19965_2.png) [@d0d04m3](https://discourse.nodered.org/u/d0d04m3)\
**Post date:** [9 March 2021 09:02 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/14 "2021-03-09T09:02:52Z")

</div>

ok so i fixed with this path.join();

```auto

var settings = {
    httpAdminRoot: "/red",
    httpNodeRoot: "/api",
    userDir: path.join(__dirname, ".hhh"),
    functionGlobalContext: {} // enables global context
};

```

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [9 March 2021 14:48 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/15 "2021-03-09T14:48:20Z")

</div>

That is the right workaround until we can find a Windows 10 VM to debug properly and work out what is happening in the core code.

---

<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:** [23 March 2021 14:48 UTC](https://discourse.nodered.org/t/i-cant-install-any-nodes-in-embedded-node-red/41791/16 "2021-03-23T14:48:43Z")

</div>

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