# Node resources ESM loading issues

**URL:** <https://discourse.nodered.org/t/node-resources-esm-loading-issues/101282>\
**Category:** Developing Nodes\
**Created:** [14 June 2026 12:47 UTC](https://discourse.nodered.org/t/node-resources-esm-loading-issues/101282 "2026-06-14T12:47:00Z")\
**Posts on this page:** 4\
**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:** [14 June 2026 12:47 UTC](https://discourse.nodered.org/t/node-resources-esm-loading-issues/101282/1 "2026-06-14T12:47:00Z")

</div>

Hi, I noticed this with Node-RED v4 and it persists with v5. I had hoped that the issue would be resolved with the newer release.

If loading the node's Editor script as a resource using ESM, not everything works as expected. e.g.

```html
<script type="module" async src="./resources/@totallyinformation/node-red-inline-debug/inline-debug.mjs"></script>

```

Note that it doesn't make any difference if you use `async` or not, the issues are the same.

Issues:

1. In the HTML file, using something like `<span data-i18n="debug.output"></span>` does not get translated. It works if the script is loaded as a normal script, but not as a module. You get no output.

2. The resource script does get loaded and run as expected. However, the `color` setting of the node does not get applied either in the palette or in the editor.

As far as I can tell so far, everything else works as expected.

---

<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:** [14 June 2026 15:12 UTC](https://discourse.nodered.org/t/node-resources-esm-loading-issues/101282/2 "2026-06-14T15:12:16Z")

</div>

> [@TotallyInformation](#):
>
> Note that it doesn't make any difference if you use `async` or not, the issues are the same.

This isn't just related to the ESM resource, but to all scripts loaded by the editor. They are all loaded asynchronously.

> <https://github.com/node-red/node-red/blob/8c76d8fb99a3cc94cf2f1a8af7f9694c14a5611d/packages/node_modules/%40node-red/editor-client/src/js/red.js#L75-L116>

---

<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:14 UTC](https://discourse.nodered.org/t/node-resources-esm-loading-issues/101282/3 "2026-06-14T15:14:09Z")

</div>

Thanks. However, there is still an issue when trying to load a node's Editor script as an ESM.

---

<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:** [13 August 2026 15:14 UTC](https://discourse.nodered.org/t/node-resources-esm-loading-issues/101282/4 "2026-08-13T15:14:24Z")

</div>

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