# Is it possible to use a node contained in a dependency?

**URL:** <https://discourse.nodered.org/t/is-it-possible-to-use-a-node-contained-in-a-dependency/79512>\
**Category:** Developing Nodes\
**Created:** [30 June 2023 19:34 UTC](https://discourse.nodered.org/t/is-it-possible-to-use-a-node-contained-in-a-dependency/79512 "2023-06-30T19:34:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [30 June 2023 19:34 UTC](https://discourse.nodered.org/t/is-it-possible-to-use-a-node-contained-in-a-dependency/79512/1 "2023-06-30T19:34:01Z")

</div>

Hi all,  
I have a palette A which contains a config-node, I would like to externalize this config-node in another module so that this config-node can be used by another palette B.  
Palettes A and B will therefore have this same config-node as a dependency.

I can't get config-node in Node-RED. The goal here is to use this config-node without having to install it, the user installs the palette and this config-node is directly present.

Is this possible or am I doing something wrong?

Thanks.

---

<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:** [30 June 2023 20:58 UTC](https://discourse.nodered.org/t/is-it-possible-to-use-a-node-contained-in-a-dependency/79512/2 "2023-06-30T20:58:03Z")

</div>

Not yet. There is a proposal on an open issue here: [Allow node modules to have node modules as dependencies · Issue #569 · node-red/node-red · GitHub](https://github.com/node-red/node-red/issues/569#issuecomment-1460556901)

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [1 July 2023 08:10 UTC](https://discourse.nodered.org/t/is-it-possible-to-use-a-node-contained-in-a-dependency/79512/3 "2023-07-01T08:10:26Z")

</div>

Ok thanks.  
A hack to advise to try to solve this issue?

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [3 July 2023 10:28 UTC](https://discourse.nodered.org/t/is-it-possible-to-use-a-node-contained-in-a-dependency/79512/4 "2023-07-03T10:28:56Z")

</div>

Is it a good idea to declare the config-node in the main package and give this as the path?

```json
"node-red": {
    "nodes": {
      "myConfigNode": "../myPackageName/build/nodes/my-config.js"
    }
}

```

---

<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:** [1 September 2023 10:29 UTC](https://discourse.nodered.org/t/is-it-possible-to-use-a-node-contained-in-a-dependency/79512/5 "2023-09-01T10:29:45Z")

</div>

Closed on 1 September 2023 10:29 UTC

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