# 🤷 Node-RED v5 now supports ESM nodes! MAYBE? Maybe not

**URL:** <https://discourse.nodered.org/t/node-red-v5-now-supports-esm-nodes-maybe-maybe-not/101259>\
**Category:** Developing Nodes\
**Created:** [11 June 2026 14:20 UTC](https://discourse.nodered.org/t/node-red-v5-now-supports-esm-nodes-maybe-maybe-not/101259 "2026-06-11T14:20:25Z")\
**Posts on this page:** 8\
**Page:** 1

<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:** [11 June 2026 14:20 UTC](https://discourse.nodered.org/t/node-red-v5-now-supports-esm-nodes-maybe-maybe-not/101259/1 "2026-06-11T14:20:25Z")

</div>

Just in case you missed this. The following PR was incorporated in v5.

> <https://github.com/node-red/node-red/pull/4355#event-26476801018>
>
> \- \[x\] Bugfix (non-breaking change which fixes an issue)
> \- \[\] New feature (non-…breaking change which adds functionality)
> 
> \## Proposed changes
> 
> Currently node-red fails when attempting to install a node written as an ESM module, e.g.
> 
> \`\`\`text
> 19 Sep 18:59:53 - \[info\] Server now running at http://127.0.0.1:1880/
> 19 Sep 18:59:53 - \[info\] Starting flows
> 19 Sep 18:59:53 - \[info\] Started flows
> 19 Sep 19:01:05 - \[info\] Installing module: @hlovdal/node-red-lowercase-in-typescript, version: 1.0.0
> 19 Sep 19:01:12 - \[info\] Installed module: @hlovdal/node-red-lowercase-in-typescript
> 19 Sep 19:01:12 - \[info\] Added node types:
> 19 Sep 19:01:12 - \[info\] - @hlovdal/node-red-lowercase-in-typescript:lower-case : Error \[ERR\_REQUIRE\_ESM\]: require() of ES Module .../.node-red/node\_modules/@hlovdal/node-red-lowercase-in-typescript/src/lower-case.js from .../node-red/packages/node\_modules/@node-red/registry/lib/loader.js not supported.
> Instead change the require of lower-case.js in .../node-red/packages/node\_modules/@node-red/registry/lib/loader.js to a dynamic import() which is available in all CommonJS modules.
> \`\`\`
> 
> This pull request fixes that by using \[dynamic \`import()\`\](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) instead of \`require\`.
> 
> \## Checklist
> 
> \- \[x\] I have read the \[contribution guidelines\](https://github.com/node-red/node-red/blob/master/CONTRIBUTING.md)
> \- \[x\] For non-bugfix PRs, I have discussed this change on the \[forum\](https://discourse.nodered.org/t/adding-support-for-installing-esm-module-nodes/81438)/slack team.
> \- \[x\] I have run \`npm run test\` to verify the unit tests pass
> \- \[\] I have added suitable unit tests to cover the new/changed functionality

~~A big step forward for the future of Node-RED. 😃~~

~~I've already migrated everything I could in UIBUILDER to ESM but now I can start migrating the runtimes as well.~~

---

<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:** [14 June 2026 15:43 UTC](https://discourse.nodered.org/t/node-red-v5-now-supports-esm-nodes-maybe-maybe-not/101259/2 "2026-06-14T15:43:00Z")

</div>

So, I attempted to migrate my inline-debug node to ESM.

> **[GitHub - TotallyInformation/node-red-inline-debug: An inline-debug node for Node-RED. With multiple...](https://github.com/TotallyInformation/node-red-inline-debug)**
>
> An inline-debug node for Node-RED. With multiple ways to control whether output is sent or not.

You can check out both the CommonJS and the ESM versions in the repo above.

The ESM version fails and I cannot work out why or how. If I swap to the ESM version, I get no errors in the node-red log nor in the Editor and the node instance code executes, I can show the node data in the log, but ... **the Editor shows the node as "Unknown".**

_I have no way of tracking down why this is happening_. I've tried doing debug traces but nothing shows up.

I anyone has any ideas as to why or how I can find the problem, please do let me know.

Sadly, until this can be worked out, I cannot recommend that anyone tries to migrate a node's runtime to ESM.

I also cannot recommend anyone tries to load a node's Editor code as an ESM resource either since that also does not work correctly (see the other thread on that subject).

Annoyingly, this means that we are still stuck in CommonJS land.

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [14 June 2026 16:11 UTC](https://discourse.nodered.org/t/node-red-v5-now-supports-esm-nodes-maybe-maybe-not/101259/3 "2026-06-14T16:11:07Z")

</div>

> [@TotallyInformation](#):
>
> The ESM version fails and I cannot work out why or how. If I swap to the ESM version,

You might want to check this out... ESM Version --\> ESM version ?

---

<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:** [14 June 2026 16:13 UTC](https://discourse.nodered.org/t/node-red-v5-now-supports-esm-nodes-maybe-maybe-not/101259/4 "2026-06-14T16:13:21Z")

</div>

Sorry, I don't understand?

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [14 June 2026 16:14 UTC](https://discourse.nodered.org/t/node-red-v5-now-supports-esm-nodes-maybe-maybe-not/101259/5 "2026-06-14T16:14:53Z")

</div>

Changing ESM Version to ESM Version?

I think it might be semantics re-reading a couple of times.

---

<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:** [16 June 2026 16:28 UTC](https://discourse.nodered.org/t/node-red-v5-now-supports-esm-nodes-maybe-maybe-not/101259/6 "2026-06-16T16:28:56Z")

</div>

We know that Node-RED is able to work with ESM nodes, based on the work Alan did with his nrg node generator. That was all ESM based and worked in NR4, let alone NR5.

I don't know the specifics, but he clearly found a way to solve some of the issues you've hit.

I don't have hands-on experience of building with ESM, so can't really suggest anything. Ideally we'd be able to step through what is/isn't working for you and figure out how to get it working. I suspect there will be some constraints, or specific patterns needed. If someone is able to figure those out, then we can add documentation around it - including the fact nrg exists as an option to use.

---

<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:** [16 June 2026 19:06 UTC](https://discourse.nodered.org/t/node-red-v5-now-supports-esm-nodes-maybe-maybe-not/101259/7 "2026-06-16T19:06:55Z")

</div>

Thanks Nick. Sorry if that previous post came across as a bit of a whinge, it was a frustrating day.

Appreciate that the complexity of Node-RED may well surface some things that need to be worked around. My problem really is that I can't find a way to debug the issue. Clearly it sometimes works but the Editor colour issue is pretty repeatable. The runtime issue is harder to analyse because I'm not seeing any errors other than the node showing up as Unknown in the Editor.

Is there any place in the core that I could find out why the node's instance function is clearly running but the the Editor shows it as unknown? If I can get a clue as to where to look, I can start to debug more intelligently.

I'm guessing that the colour issue is a timing edge-case but the runtime issue, I've no place to start I'm afraid.

---

<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 August 2026 19:07 UTC](https://discourse.nodered.org/t/node-red-v5-now-supports-esm-nodes-maybe-maybe-not/101259/8 "2026-08-15T19:07:28Z")

</div>

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