Updating node-RED - settings.js

I always update node-RED by using the official script, and was already aware that the existing settings.js file (from the old node-RED) in not overwritten when the new version is installed.

However, new features are added into the stock settings.js file from time to time, which although have never been breaking changes, those features will not be available to the user unless their settings.js file is replaced/updated. Example in v1.1.0 - the https function.

Would it be possible to let users know when the settings.js file requires updating, for example in the release blog, or a sticky in the forum?

The release blog post did highlight the new features and in the case of the new HTTPS feature, explicitly linked to the updated section of the default settings file for the user to see what was needed.

You are of course correct;

"The default settings file has been updated with examples for how to configure this"

I must pay more attention when reading the blog, it's easy to skip over pertinent points when rushing through looking for the next new feature in the blog!

There is one thing that might be confusing: not all users will read through all the release notes. And when they read the official documentation, I assume they go straight to their own settings.js file where they won't find the newly added settings (unless they started installing a Node-RED version 1.1.0 from scratch). They should be aware (not sure how at the moment) to have a look a the default settings.js file. Unless that is somewhere already available in the documentation. Don't know that...

Just noticed, the settings.js file says node.js ver 11 and above, whilst the blog says node.js v12 or later.

Which is it?

It is available from NodeJs version 11, as you can see on their documentation. Evidence marker 1 :wink:

1 Like

The required functionality was introduced into node 11.
We recommend LTS versions of node - so 10 12 etc
So both are correct :slight_smile: - but yes 12.

2 Likes

You should be a politician!

Such a shame we can't vote in Belgium for that guy :rofl:
See you tomorrow people ...

Out of interest, are there any future plans to allow changing settings.js from within the editor's settings? It would be much easier for new starters and would overcome the problem identified by the OP.

It has come up before as an idea, but there's nothing specific in the plan about it.

Most of the settings in the settings file require a complete restart of Node-RED in order to take effect and we don't have a mechanism in Node-RED to do a controlled restart of the process.

Also, as the settings are JavaScript code, it is actually very hard for us to validate anything the user enters - so they could well completely break their installation and not be able to get back into the editor in order to fix it.

So on balance, there is value in requiring the user to be aware of the settings file and take ownership of the changes made.

That is not to say we couldn't try to find ways to make that easy to do.

Bit late to this discussion but I'll say that I always compare my settings.js file with the one in the Node-RED module when installing new versions. That way I can see the differences.

Might also be a good time to remind you Nick that a while back I made a suggestion about some changes to settings.js that would make it a lot easier (I believe) to read & also possibly a bit more flexible.

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