# 🎉 Node-RED 2.0 Released

**URL:** <https://discourse.nodered.org/t/node-red-2-0-released/48647>\
**Category:** News\
**Created:** [20 July 2021 10:45 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647 "2021-07-20T10:45:29Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [20 July 2021 10:45 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/1 "2021-07-20T10:45:29Z")

</div>

Node-RED 2.0 is now generally available for everyone to use!

Thanks to everyone who tested the beta releases and provided feedback.  
Full details of the release are available on the blog:

> **[Version 2.0 released](https://nodered.org/blog/2021/07/20/version-2-0-released)**
>
> Find out more on the blog

Updated docker images will be arriving later today.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [20 July 2021 10:51 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/2 "2021-07-20T10:51:45Z")

</div>

`node-red admin init` is a great idea, and makes it a much easier setup, especially for new users. 👍

---

<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:** [20 July 2021 12:42 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/3 "2021-07-20T12:42:10Z")

</div>

Docker images have been built and published to dockerhub.

---

<div class="post-metadata">

**Author:** ![mbonani](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mbonani/32/10631_2.png) [@mbonani](https://discourse.nodered.org/u/mbonani)\
**Post date:** [20 July 2021 13:03 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/4 "2021-07-20T13:03:53Z")

</div>

🎉 The theme collection is also available for Node-RED 2.0.

> **[Node-RED Contrib Themes](https://github.com/node-red-contrib-themes/)**
>
> Contrib themes for Node-RED. Node-RED Contrib Themes has 7 repositories available. Follow their code on GitHub.

---

<div class="post-metadata">

**Author:** ![get\_joe](https://avatars.discourse-cdn.com/v4/letter/g/35a633/32.png) [@get\_joe](https://discourse.nodered.org/u/get_joe)\
**Post date:** [20 July 2021 13:20 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/5 "2021-07-20T13:20:52Z")

</div>

None of the modules imported by the function node are working on my two Node-RED instances.. Worked perfectly in 1.3.5. I have verified that functionExternalModules is set to true. It seems like the modules are not getting downloaded into the new directory for modules.

The instances are running using the :latest docker-image.

---

<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:** [20 July 2021 13:30 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/6 "2021-07-20T13:30:08Z")

</div>

@get_joe hmm , yes, I can see an issue. Investigating...

---

<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:** [20 July 2021 13:52 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/7 "2021-07-20T13:52:54Z")

</div>

@get_joe Node-RED 2.0.1 has been published. Docker images building at the moment.

This was a bug I introduced last week and failed to spot relating to how we load modules in the Function node. I failed to spot the modules I was testing with had named exports so behaved slightly differently to other modules without named exports.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 July 2021 14:05 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/8 "2021-07-20T14:05:15Z")

</div>

One of the unwritten laws of semantic versioning is that any release ending in 0 does not survive more than a couple of hours.

---

<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:** [20 July 2021 14:06 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/9 "2021-07-20T14:06:16Z")

</div>

> [@Colin](#):
>
> any release ending in 0 does not survive more than a couple of hours.

It's true. But the goal of the extended beta periods is to minimise the chances of that happening.

Sadly its a change I made since the last beta that broke things. Mea Culpa.

---

<div class="post-metadata">

**Author:** ![get\_joe](https://avatars.discourse-cdn.com/v4/letter/g/35a633/32.png) [@get\_joe](https://discourse.nodered.org/u/get_joe)\
**Post date:** [20 July 2021 15:52 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/10 "2021-07-20T15:52:16Z")

</div>

That resoled most of my issues, but some modules still wouldn't get downloaded. See the error code:

```auto
 20 Jul 16:41:43 - [error] [function:b3cafeef.b6674] Error: Cannot find module '/data/node_modules/moment'
NoderedExt | Require stack:
NoderedExt | - /usr/src/node-red/node_modules/@node-red/registry/lib/externalModules.js
NoderedExt | - /usr/src/node-red/node_modules/@node-red/registry/lib/registry.js
NoderedExt | - /usr/src/node-red/node_modules/@node-red/registry/lib/index.js
NoderedExt | - /usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
NoderedExt | - /usr/src/node-red/node_modules/@node-red/runtime/lib/index.js
NoderedExt | - /usr/src/node-red/node_modules/node-red/lib/red.js
NoderedExt | - /usr/src/node-red/node_modules/node-red/red.js

```

Ended up going into CMD and doing an NPM install due to the modules were present in package.json.

---

<div class="post-metadata">

**Author:** ![AleksCee](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alekscee/32/36183_2.png) [@AleksCee](https://discourse.nodered.org/u/AleksCee)\
**Post date:** [20 July 2021 16:13 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/11 "2021-07-20T16:13:32Z")

</div>

Great work! The only error I get was from the sqlclient-node which was fixed with npm rebuild.  
I'm really grateful about the quality of your work!  
Thanks, Alex

---

<div class="post-metadata">

**Author:** ![dudleyjosh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dudleyjosh/32/105799_2.png) [@dudleyjosh](https://discourse.nodered.org/u/dudleyjosh)\
**Post date:** [20 July 2021 20:48 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/12 "2021-07-20T20:48:01Z")

</div>

I'm getting the following two errors for each function node which used external modules in my Windows Server 2008 environment... it's working fine in my macOS environment.

`"Failed to load module : Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'"`

`"Function node failed to load external modules"`

---

<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:** [20 July 2021 20:54 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/13 "2021-07-20T20:54:27Z")

</div>

> [@dudleyjosh](#):
>
> Received protocol 'c:'

Try taking out the `c:`? I can't offhand remember the actual format for including a drive letter in URL format. I seem to remember that there is one. But if you only have a c: drive, it doesn't matter. Use POSIX style instead.

---

<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:** [20 July 2021 20:56 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/14 "2021-07-20T20:56:44Z")

</div>

@dudleyjosh interesting. Turns out Windows does behave differently to other OS. We're falling foul of [https://github.com/nodejs/node/issues/31710](https://github.com/nodejs/node/issues/31710)

@TotallyInformation it's internal NR code that is generating the absolute path to the module - where we ought to be then converting it to a file:// url for complete cross-platform compatibility.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [20 July 2021 20:58 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/15 "2021-07-20T20:58:00Z")

</div>

I've been previously running beta, and really enjoyed being able to add packages in the function node, I've tried quite a few, and which have been added to the `.node-red/externalModules` folder.  
But because the external modules are not automatically deleted when they were no longer used, I was intending to manually delete the majority, and just keep the odd few that I need.  
Having just updated to v2.0.1, it appears that now, the external modules listed in the `.node-red/externalModules` folder have been copied across to the main `.node-red/node_modules` folder, with the prompt to now delete `.node-red/externalModules`.

As they are all mixed up together in one folder it makes it more difficult to distinguish packages which are currently being used, and those that are not.

Probably my own fault for not reading the release blog, but I wrongly assumed that new features wouldn't be added after the final beta.

---

<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:** [20 July 2021 21:00 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/16 "2021-07-20T21:00:00Z")

</div>

It will only have reinstalled the modules that your nodes are actively using.

If you want to see a list of what it has installed, we keep a list in `~/.node-red/.config.modules.json`

---

<div class="post-metadata">

**Author:** ![dudleyjosh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dudleyjosh/32/105799_2.png) [@dudleyjosh](https://discourse.nodered.org/u/dudleyjosh)\
**Post date:** [20 July 2021 21:01 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/17 "2021-07-20T21:01:08Z")

</div>

I'm up and running using the old GlobalContext for now... so it isn't a show stopper for me. Just wanted put it out there incase it was an actual issue that needed addressed.

---

<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:** [20 July 2021 21:01 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/18 "2021-07-20T21:01:14Z")

</div>

> [@knolleary](#):
>
> it's internal NR code that is generating the absolute path to the module - where we ought to be then converting it to a file:// url for complete cross-platform compatibility.

Ah, OK. That thread seems to have a viable answer though.

Windows non-POSIX drive specs have always been a bit of a pain. Doesn't translate well to a URL scheme. I blame Bill Gates! 😀

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [20 July 2021 21:10 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/19 "2021-07-20T21:10:19Z")

</div>

> [@knolleary](#):
>
> It will only have reinstalled the modules that your nodes are actively using

That's good news, thank you.  
If that is the case, will externally loaded modules now be routinely deleted from `.node-red/node_modules` when not required, similar to other node dependencies?

---

<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:** [20 July 2021 21:21 UTC](https://discourse.nodered.org/t/node-red-2-0-released/48647/20 "2021-07-20T21:21:10Z")

</div>

No. We don't remove modules. We will provide a UI feature at some point that helps you manage them.

[Next page](https://discourse.nodered.org/t/node-red-2-0-released/48647.md?page=2)
