# Use engines in package.json to determine the node-red version requirements for custom nodes

**URL:** <https://discourse.nodered.org/t/use-engines-in-package-json-to-determine-the-node-red-version-requirements-for-custom-nodes/97265>\
**Category:** Feature Requests\
**Created:** [25 May 2025 17:00 UTC](https://discourse.nodered.org/t/use-engines-in-package-json-to-determine-the-node-red-version-requirements-for-custom-nodes/97265 "2025-05-25T17:00:56Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![AllanOricil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allanoricil/32/106911_2.png) [@AllanOricil](https://discourse.nodered.org/u/AllanOricil)\
**Post date:** [25 May 2025 17:00 UTC](https://discourse.nodered.org/t/use-engines-in-package-json-to-determine-the-node-red-version-requirements-for-custom-nodes/97265/1 "2025-05-25T17:00:56Z")

</div>

vscode, npm, pnpm, yarn use engines to determine their minimum required version. Node-RED could do the same to make the ecosystem of packages authored using a package.json to describe its metadata consistent.

> **[Publishing Extensions](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#visual-studio-code-compatibility)**
>
> Learn how to publish Visual Studio Code extensions to the public Marketplace and share them with other developers.

---

<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:** [25 May 2025 17:02 UTC](https://discourse.nodered.org/t/use-engines-in-package-json-to-determine-the-node-red-version-requirements-for-custom-nodes/97265/2 "2025-05-25T17:02:14Z")

</div>

Node-RED does use engines doesn't it?

Each version is pegged to a specific version of node.js which is the minimum version people should be using.

```js
    "engines": {
        "node": ">=18.5"
    }
}

```

---

<div class="post-metadata">

**Author:** ![AllanOricil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allanoricil/32/106911_2.png) [@AllanOricil](https://discourse.nodered.org/u/AllanOricil)\
**Post date:** [25 May 2025 17:05 UTC](https://discourse.nodered.org/t/use-engines-in-package-json-to-determine-the-node-red-version-requirements-for-custom-nodes/97265/3 "2025-05-25T17:05:06Z")

</div>

Does it read `engines.node-red` to verify if a package is compatible with a given node-red version?

```json
{
    "engines" : { 
        "node-red" : ">=4"
    }
}

```

I thought node-red would only read `node-red.version` from the package.json to verify if a package is compatible.

Like npm, yarn, pnpm and node, vscode also reads `engines.vscode` to determine if an extension is compatible or not, instead of a separate vscode attribute in the package.json.

---

<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:** [25 May 2025 17:07 UTC](https://discourse.nodered.org/t/use-engines-in-package-json-to-determine-the-node-red-version-requirements-for-custom-nodes/97265/4 "2025-05-25T17:07:38Z")

</div>

Ah, I see what you mean.

No, but each node package is supposed to specify what versions of Node-RED it is compatible with. e.g. from UIBUILDER 7.x:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/4/14ea5975c8d225d95fae213f653fd4ef80634a94.png)

So that is how it checks whether a node is compatible I believe.

PS: Think I mangled understanding what you wrote there - still, hopefully clear.

---

<div class="post-metadata">

**Author:** ![AllanOricil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allanoricil/32/106911_2.png) [@AllanOricil](https://discourse.nodered.org/u/AllanOricil)\
**Post date:** [25 May 2025 17:08 UTC](https://discourse.nodered.org/t/use-engines-in-package-json-to-determine-the-node-red-version-requirements-for-custom-nodes/97265/5 "2025-05-25T17:08:37Z")

</div>

Yes, I think that is the only way at the moment. But to standardize the ecosystem, Node-RED should also read the value from the `engines.node-red` property in package.json

---

<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:** [25 May 2025 17:10 UTC](https://discourse.nodered.org/t/use-engines-in-package-json-to-determine-the-node-red-version-requirements-for-custom-nodes/97265/6 "2025-05-25T17:10:40Z")

</div>

npm, pnpm and yarn are all general package managers.

Other than VS Code, are you aware of any other applications that make use of `engines` for their own app version checks?

Not saying that using `engines` wouldn't have been a better choice. However, it has been that way for a long time now - is it sufficiently critical to want to disrupt it?

---

<div class="post-metadata">

**Author:** ![AllanOricil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allanoricil/32/106911_2.png) [@AllanOricil](https://discourse.nodered.org/u/AllanOricil)\
**Post date:** [25 May 2025 17:59 UTC](https://discourse.nodered.org/t/use-engines-in-package-json-to-determine-the-node-red-version-requirements-for-custom-nodes/97265/7 "2025-05-25T17:59:07Z")

</div>

Electron apps also use it

---

<div class="post-metadata">

**Author:** ![AllanOricil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allanoricil/32/106911_2.png) [@AllanOricil](https://discourse.nodered.org/u/AllanOricil)\
**Post date:** [25 May 2025 18:00 UTC](https://discourse.nodered.org/t/use-engines-in-package-json-to-determine-the-node-red-version-requirements-for-custom-nodes/97265/8 "2025-05-25T18:00:59Z")

</div>

> [@TotallyInformation](#):
>
> Not saying that using `engines` wouldn't have been a better choice. However, it has been that way for a long time now - is it sufficiently critical to want to disrupt it?

It is my ocd, really. I like to follow standards when I notice them

---

<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:** [25 May 2025 20:06 UTC](https://discourse.nodered.org/t/use-engines-in-package-json-to-determine-the-node-red-version-requirements-for-custom-nodes/97265/9 "2025-05-25T20:06:15Z")

</div>

> [@AllanOricil](#):
>
> It is my ocd, really. I like to follow standards when I notice them

Oh, I get it - I have the same "issue" 🙂

However, I also have a lifetime of IT experience as well. Sometimes, things have to be put into priority. 🤷

There are so many exciting things that could be done still with Node-RED and so few people to work on them. Just my personal opinion, but we have something that works and is clear and easy to use, robust and reliable. Might not be perfect but it works. Changing at this point would take up valuable development and testing resources and might result in additional confusion.

---

<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:** [7 June 2025 20:13 UTC](https://discourse.nodered.org/t/use-engines-in-package-json-to-determine-the-node-red-version-requirements-for-custom-nodes/97265/10 "2025-06-07T20:13:25Z")

</div>

I completely forgot I created this request:

> <https://github.com/node-red/node-red/issues/4953>
>
> \## Description
> 
> To improve the Palette UI, I would like to add the following f…eatures:
> 
> \- Warn the user about updating a module to a major version
> - In the UI (to be found)
> - In the update confirmation notification
> 
> \- Prevent installing/updating a module if the engine is not satisfied
> - Node-RED version
> - Node version
> 
> (prevent the user from installing it because it will fail)
> 
> \- Add link icons to the node library in the "Nodes" tab
> 
> \## Related Links
> 
> \- #4931 
> \- #4933
> \- https://discourse.nodered.org/t/installed-node-links-to-flows-page/93076
> \- https://discourse.nodered.org/t/feedback-wanted-how-do-you-use-the-manage-palette/92787
> \- https://discourse.nodered.org/t/add-changelog-preview-into-the-palette-manager/92695
> \- https://discourse.nodered.org/t/request-for-feedback-flow-library-categories/92660
> \- https://discourse.nodered.org/t/node-catalog-purge/92831

---

<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:** [6 August 2025 20:13 UTC](https://discourse.nodered.org/t/use-engines-in-package-json-to-determine-the-node-red-version-requirements-for-custom-nodes/97265/11 "2025-08-06T20:13:51Z")

</div>

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