🎉 Node-RED 3.1.0-beta.4 released

:tada: Whilst it isn't the excitement of the final 3.1 release, this is the next best thing - a new beta for the release.

Node-RED 3.x requires at least Node 14.x, but that has already reached its end-of-life. These days you should really be using Node 18 as even Node 16 only has a short time before it reaches its end-of-life.

The Change Log has the full list of changes.

If you haven't tried the previous beta releases, please check their release posts for details on what's included:

Note: if any issues are reported against the beta, we'll update this post to list them here. If you hit a problem, please do check back here before adding a comment.

Known Issues

  • none

Improved wiring for horizontally aligned nodes

Following this discussion on the forum, we've made some modifications to the wiring layout logic to improve cases where wires loop back on horizontally laid out nodes.

Here is a before/after pair of screenshots.

New subflow env vars

Within a subflow, you can now use NR_SUBFLOW_NAME NR_SUBFLOW_ID and NR_SUBFLOW_PATH to access those properties of the subflow instance node.

These join the existing NR_NODE_*/NR_FLOW_* and NR_GROUP_* equivalents.

Individual http middleware for httpStatic routes

It is now possible to configure separate middleware functions for different httpStatic configured routes.

See #4229 for the details.

Changes to how Environment Variables are evaluated

Environment variables are statically defined values that cannot be changed whilst the flow is running. There were some edge cases to this, such as using a JSONata expression of $now() that would get re-evaluated every time it was referenced.

Because of the need to make JSONata fully asynchronous in the future, we've changed how the env var evaluation is done - their values are now all generated when the flows start and not re-evaluated again.

This should not cause any changes in behaviour, unless you were relying on the $now() trick that was not an intentional behaviour.

As nodes can depend on env var values, we've also updated the logic around the 'modified nodes' and 'modified flows' types of deploys. Changing an env var at the flow level will now cause all of the nodes on that flow to be considered modified. This is a bit of a blunt solution and it may be able to refine it to be more selective to only the nodes that reference the changed env var - but that's beyond the scope of getting 3.1 released any time soon.

Be sure to read through the Change Log to see what else is in there.

Installing the beta

If you want to try out the beta, you will need specify node-red@next when you use npm to update. Without the @next you'll still get 3.0.x

So on a Pi you'd do:

sudo npm install -g --unsafe-perm node-red@next

Reporting problems

If you hit any problems, please report them either as a reply on this topic, or in the #core-dev slack channel. Please do not post new topics to the forum regarding the beta as that could confuse users who are not using the beta.

Outstanding work

The main task is now to get the 3.1 release done. There really is nothing else we want to get into it. Anything else at this point, unless critical, will be considered bug fixes for 3.1.1.


Excellent!!! Looking forward to hours of tweaking my layouts :joy: :joy: :joy: :joy:

That should be "untweaking" surely? :wink:


Docker containers for the 3.1.0-beta.4 release available as tags on nodered/node-red-dev as usual


Just a slight issue at times with the line going blank near where a status symbol could appear



How is that particular debug node set up?

Also, what browser please?

Lastly, if you could, what do you see in the html if you inspect that area?

I think it is the status text background element overlapping the wire but would like to see the html/SVG


1 Like

Giving node status a semi-opaque background (when it is non-null) is a big improvement from 3.0.2.

There does seem to be a z-index issue remaining though:


3.1.0 beta4

Edit - sorry, my wires are customised. Don't think it affects this observation.

.red-ui-flow-link-line {
        stroke: #0722fc;
        stroke-width: 1;

Simon, what browser, platform and node.js do you see this on? On my Mac with Safari, FireFox and Chrome (Node.js v18.12.1) I can't recreate this. Also I can not get the inject node to show the blue dot and have the button not be faded.
Screenshot 2023-07-29 at 6.21.21 AM

What if you set the debug to show status & deploy?

Also, try sending an empty string or a single space

1 Like

Ahh setting it to display node status causes the blank space to show up.

1 Like


Vivaldi browser - same effect in Edge
Sending empty string give same effect

Can't work out how to do that I'm afraid

1 Like

Steve, here is what the HTML shows when selecting that spot:

<g class="red-ui-flow-node-status-group" transform="translate(-14,33)" style="display: inline;">
	<rect class="red-ui-flow-node-status-background" x="17" y="-1" width="6" height="13" rx="1" ry="1"></rect>
	<rect class="red-ui-flow-node-status red-ui-flow-node-status-ring-grey" x="6" y="1" width="9" height="9" rx="2" ry="2" stroke-width="3" style="display: none;"></rect>
	<text class="red-ui-flow-node-status-label" x="20" y="10"></text></g>
1 Like

Another example

Sorry, I'm confused. I thought that $now() was meant to return the CURRENT timestamp? Are you saying that it now does not do that?

Generates a timestamp in ISO 8601 compatible format and returns it as a string.

Does that mean that you can no longer to current time calculations using JSONata?

I'm only talking about when an Env Var is set via a JSONata expression. It is evaluated at deploy and not again.

All other uses of JSONata (such as in the Change node) continues as it always has.

Ah! Well, that's what happens when you've been trying the alcoholic & food specialities of 3 different countries for a week! :rofl: Thanks for the clarification.


Is it normal, that every opened function node became changed even if not? It's not changed if I closing edit window with 'Cancel' button

It depends when those function nodes were written and if any new properties have been added to the src function node since. Could you select one function node that exhibits this behaviour and export it? I will import it and have a try.

I found problem. This is because of the new timeout feature, it is added to the node after closing. Property changes from undefined to ""

Should there be a reference to the timeout feature in the help pane? It isn't mentioned in the writing functions docs either.

1 Like