# 🎉 Node-RED 2.2.0 released

**URL:** <https://discourse.nodered.org/t/node-red-2-2-0-released/57338>\
**Category:** News\
**Created:** [27 January 2022 13:12 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338 "2022-01-27T13:12:46Z")\
**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:** [27 January 2022 13:12 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/1 "2022-01-27T13:12:46Z")

</div>

Node-RED 2.2.0 has been released!

Full details of what's in the release available on the blog - [Version 2.2 released : Node-RED](https://nodered.org/blog/2022/01/27/version-2-2-released)

Thanks to everyone who contributed to this release and helped test the beta.

---

<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:** [27 January 2022 14:11 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/2 "2022-01-27T14:11:25Z")

</div>

Sorry Nick, quick question. The new environment variables in the function node - are those available to the instance function inside a custom node? I know that the node id and name are available directly from `this` and you've added the `_path` as well. But what about the containing group?

Also, groups can be nested - I assume there is no direct way of getting that nesting? Not sure there is a good reason for doing that by the way, just interested.

As always, a very nice set of updates. Thanks.

---

<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:** [27 January 2022 14:14 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/3 "2022-01-27T14:14:53Z")

</div>

@TotallyInformation the proper way for a node to access Env Vars is:

```auto
const value = RED.util.getSetting(node, envVar);

```

The ensures it is resolve at the right 'scope'.

> I assume there is no direct way of getting that nesting?

No, groups are not exposed in the runtime in any meaningful way - they are primarily an organisation tool in the editor. That has blurred slightly now you can set env vars on a group (since 2.1.0) - but we haven't added any particular apis in the runtime for a node to know about groups.

---

<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:** [27 January 2022 14:20 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/4 "2022-01-27T14:20:02Z")

</div>

Thanks for that Nick.

By the way, I don't think I mentioned it because it took me a while to realise the power - but the env vars in groups is great! Extremely useful to be able to set some standard data at the group level. Or indeed to be able to create a hierarchy of information by setting the same environment variable at different levels - e.g. flow, outer and inner groups.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [28 January 2022 13:28 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/5 "2022-01-28T13:28:02Z")

</div>

How do I detach a node without assigning it a shortcut key please?

---

<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:** [28 January 2022 13:37 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/6 "2022-01-28T13:37:40Z")

</div>

The release notes say Ctrl & delete (or drag).  
Is that not working for you?

---

<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:** [28 January 2022 13:38 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/7 "2022-01-28T13:38:54Z")

</div>

Slight oddity in the detach feature.

If you detach and then undo with the cursor in a slightly different place, the result is that the detached node ends up somewhere it didn't start BUT the Editor doesn't know and doesn't mark the node as changed. So if you then reload the Editor it goes back to its original location.

> [@Paul-Reed](#):
>
> Ctrl & delete

That deletes rather than detach. Ctrl-drag does nothing.

As far as I can tell, you have to have a shortcut defined. I replaced ctrl-d (deploy) to do it. Though whether I'll ever remember is another matter! 😀

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [28 January 2022 13:58 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/8 "2022-01-28T13:58:55Z")

</div>

> [@TotallyInformation](#):
>
> As far as I can tell, you have to have a shortcut defined

OK

Like the idea of ctrl-d(etach)

Maybe it'd be possible in future versions to use ctrl and drag to do this

Note - I had to remove ctrl-d from my browser shortcuts (Vivaldi - it was used to do Bookmarks)

---

<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:** [28 January 2022 18:13 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/9 "2022-01-28T18:13:23Z")

</div>

> [@cymplecy](#):
>
> Note - I had to remove ctrl-d from my browser shortcuts (Vivaldi - it was used to do Bookmarks)

I didn't need to remove it from my browser but it only worked when set as a global rather than workspace shortcut.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 January 2022 18:26 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/10 "2022-01-28T18:26:25Z")

</div>

> [@cymplecy](#):
>
> Like the idea of ctrl-d(etach)

I would recommend you dont apply any muscle memory to CTRL+D for that action.

CTRL+D is a fairly well known and super useful multi cursor timesaver

![Code_mYzzg8U2Eh](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/a/ba6d0ac07b52ef1cef1aa945b1558659e67b1a51.gif)

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [28 January 2022 18:46 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/11 "2022-01-28T18:46:00Z")

</div>

Do I do any coding? 🙂

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 January 2022 19:19 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/12 "2022-01-28T19:19:45Z")

</div>

Ah hahaha. Yes I forgot haha.

😂😂😂

---

<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:** [28 January 2022 20:08 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/13 "2022-01-28T20:08:06Z")

</div>

I can never remember that stuff!!

I've a few key combinations that I always remember because I've done them forever. Everything else has to be really simple to remember. 🧓 I so rarely do multi-cursor edits, there is no way I'd remember that.

---

<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:** [28 January 2022 20:30 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/14 "2022-01-28T20:30:10Z")

</div>

> [@TotallyInformation](#):
>
> I can never remember that stuff!!

I can never remember the Monaco shortcuts.... not even the shortcut to display the shortcuts 🤔

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [28 January 2022 21:07 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/15 "2022-01-28T21:07:12Z")

</div>

I've come back to this and I've switched to ctrl-e(xtraction)

So I can re-instate using ctrl-d for all those times I'm in need of a mutli-cursor timesaver..... 🙂

---

<div class="post-metadata">

**Author:** ![SonoraTechnical](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sonoratechnical/32/20033_2.png) [@SonoraTechnical](https://discourse.nodered.org/u/SonoraTechnical)\
**Post date:** [29 January 2022 04:43 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/16 "2022-01-29T04:43:14Z")

</div>

I installed this on a brand new install of Bullseye (literally released today)..

I was hoping to get nodejs v16... i keep getting 12.22.5

I thought there was an option that could be added to the default node-red install script for raspberry pi to force the absolute latest node.js and even npm ... but I can't find it.

---

<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:** [29 January 2022 07:09 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/17 "2022-01-29T07:09:56Z")

</div>

What script are you using to install node red? The install script in the node red docs should default to 14 (unless 12 is already installed) or you can add `--node16` to force version 16.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 January 2022 07:56 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/18 "2022-01-29T07:56:31Z")

</div>

Or `--help` to see all options

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [29 January 2022 13:36 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/19 "2022-01-29T13:36:08Z")

</div>

I've been having a (dangerous I know) think about this again and switched back to ctrl-d as the action is called Detach and not Extract

Surely, in this day and age etc, NR should be clever enough to work out that you are inside the editor and switch to using specific Monaco shortcuts when in that mode?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [29 January 2022 13:42 UTC](https://discourse.nodered.org/t/node-red-2-2-0-released/57338/20 "2022-01-29T13:42:34Z")

</div>

I haven't checked but yes you are right.

It was more about committing muscle memory to that action.

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