# Stop installing/updating a node by requiring specific node-red version

**URL:** https://discourse.nodered.org/t/stop-installing-updating-a-node-by-requiring-specific-node-red-version/84865
**Category:** Developing Nodes
**Created:** [24 January 2024 07:57 UTC](https://discourse.nodered.org/t/stop-installing-updating-a-node-by-requiring-specific-node-red-version/84865 "2024-01-24T07:57:59Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Supergiovane](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/supergiovane/32/9716_2.png) [@Supergiovane](https://discourse.nodered.org/u/Supergiovane)
#### Post date: [24 January 2024 07:57 UTC](https://discourse.nodered.org/t/stop-installing-updating-a-node-by-requiring-specific-node-red-version/84865/1 "2024-01-24T07:57:59Z")

</div>

Hi  
i'm missing something with that part in package json file:

"node-red": {  
"version": "\>=3.1.1",  
"plugins": {  
"commonFunctions": "/nodes/commonFunctions.js"  
},

I want the user not to be able to install my node, if node-red version is below 3.1.1. I thought that was enough to put a "version" key in the json file, but either it doesn't work, or i've misunderstood such key.  
Is there a way to stop the installation/update of a node, if node-red version is below 3.1.1?  
Thanks

---

<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: [24 January 2024 08:56 UTC](https://discourse.nodered.org/t/stop-installing-updating-a-node-by-requiring-specific-node-red-version/84865/2 "2024-01-24T08:56:39Z")

</div>

Hi,  
I tried that locally (without install) and it works

```js
"node-red": {
    "nodes": {},
    "version": ">=4.0.0"
}

```

> <https://github.com/node-red/node-red/blob/5b096bfd5ee1c9b2a5e624ee7e13aa16b145da8b/packages/node_modules/%40node-red/registry/lib/loader.js#L110-L111>

But the `installer` module does not seem to verify it!

---

<div class="post-metadata">

### Author: ![Supergiovane](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/supergiovane/32/9716_2.png) [@Supergiovane](https://discourse.nodered.org/u/Supergiovane)
#### Post date: [24 January 2024 09:28 UTC](https://discourse.nodered.org/t/stop-installing-updating-a-node-by-requiring-specific-node-red-version/84865/3 "2024-01-24T09:28:20Z")

</div>

Hi GogoVega  
Thank you for your answer and to point me out the source code.  
@knolleary Nick, can you check that? Thank you very much.

---

<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: [24 January 2024 09:34 UTC](https://discourse.nodered.org/t/stop-installing-updating-a-node-by-requiring-specific-node-red-version/84865/4 "2024-01-24T09:34:24Z")

</div>

Nick, to resolve this case, I believe we can add the version to satisfy in the catalog?

We can even modify the UI to clearly indicate that this module is not authorized?

---

<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: [24 January 2024 10:20 UTC](https://discourse.nodered.org/t/stop-installing-updating-a-node-by-requiring-specific-node-red-version/84865/5 "2024-01-24T10:20:14Z")

</div>

I saw that it ignore here (not useful here but always good to know):

> <https://github.com/node-red/node-red/blob/5b096bfd5ee1c9b2a5e624ee7e13aa16b145da8b/packages/node_modules/%40node-red/editor-client/src/js/ui/utils.js#L1393-L1404>

I think it can be done here:

> <https://github.com/node-red/node-red/blob/5b096bfd5ee1c9b2a5e624ee7e13aa16b145da8b/packages/node_modules/%40node-red/editor-client/src/js/ui/palette-editor.js#L337-L345>

I show the update button, disable it and change the tooltip message 😁  
This version must also be included in the catalog

---

<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: [24 March 2024 10:20 UTC](https://discourse.nodered.org/t/stop-installing-updating-a-node-by-requiring-specific-node-red-version/84865/6 "2024-03-24T10:20:22Z")

</div>

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