🎉 Node-RED 2.1.4 released

Node-RED 2.1.4 is now available, rolling up quite a few fixes

One of the more obvious changes we've made is with the ability to hide flows.

We had received consistent feedback that the use of the x icon on the tab left users feeling unsure as to whether they were deleting the tab rather than hiding it.

With this release we've changed the icon to an eye that matches the icon used in the info sidebar to indicate hidden tabs.

(Subflow tabs still have the x icon as they always have had... but we'll review that in the future)

We've also updated the tab menu so that if you have hidden tabs, there's a new option at the top of the menu to list them in the search dialog.

image

Full details for this release here: Release 2.1.4: Maintenance Release · node-red/node-red · GitHub

21 Likes

Hi,

Typically I need to ssh in to upgrade the package so, I was wondering if an option can be incorporated into the editor page's menu to check/update to a new version?

Probably, this question has already been answered :ok_man:

Thanks and regards.
E.

Hi,

Yes, this has been discussed many times. Node-RED isn't able to update itself due to the wide range of ways it could be installed and managed.

Got it, thank you.
BTW, I'm impressed with your work and mainly with your dedication/passion for it. :clap: If politicians could do the same, we'd live in a better world :sunglasses:

6 Likes

You should be able to check the current install via a flow of course. npm is the tool that does the hard work.

Running the command:

npm outdated node-red

Should give output something like:

Package   Current  Wanted  Latest  Location
node-red    2.1.3   2.1.4   2.1.4  node-red-master

Better still, npm outdated node-red --json gives something like:

{
  "node-red": {
    "current": "2.1.3",
    "wanted": "2.1.4",
    "latest": "2.1.4",
    "location": "node_modules/node-red"
  }
}

You would need to check that with a global install of node-red though as I use a local install.

You could use this output to trigger an install of the latest version. Of course, you would then also need to restart node-red.

You can also put the right commands as scripts into your package.json file and then simply execute something like cd ~/.node-red && npm run install-nr where install-nr is the script name in package.json.

    "install-nr": "npm install -g node-red@latest --unsafe-perm --production"

If you are running NR via systemd, restarting is relatively straight-forwards though you need to make sure that the user running node-red has the rights to run this command with sudo but without a password:

If running Node-RED manually, this can be tricky from inside node-red itself unless you capture the PID of the started task. I do this by adding it to an environment variable from within settings.js. Putting the following before the module.exports line of the file:

const fs   = require('fs')

/** Save a PID file so that Node-RED can be easily restarted even when run manually */
const pid = process.pid
console.info('PID: ', pid)
process.env.node_red_pid = pid+''
fs.readdir('.', (err, files)=>{
    if (err) throw err

    for (var i = 0, len = files.length; i < len; i++) {
        var match = files[i].match(/.*\.pid/)
        if(match !== null) fs.unlink(match[0], (err) => {
            if (err) throw err
        })
    }

    fs.writeFile(`${pid}.pid`, `${pid}`, (err) => {
        if (err) throw err
    })
})
5 Likes

Updated to new Node-RED-minimal container image 2.1.4 on Kubernetes with no issues. Loving the effort and new features.

1 Like

Can't agree more.

when i run this, i get below result, why is it showing current 1.3.5 when i have 2.1.3 ?
what am i missing ?

after updating to Node-red 2.1.4 also, same message.
i must be doing something wrong

image

Do you have package.json file in that directory and if so, does it have an entry for Node-RED in the dependencies section?

I am not sure i understood you, but if this is what you mean,
i have a file called package.json in the .node-red folder. and the contents of that file are given below

{
    "name": "node-red-project",
    "description": "A Node-RED Project",
    "version": "0.0.1",
    "private": true,
    "dependencies": {
        "node-red-contrib-boolean-logic-ultimate": "~1.0.20",
        "node-red-contrib-calc": "~1.0.5",
        "node-red-contrib-cron-plus": "~1.4.3",
        "node-red-contrib-drawsvg": "~1.2.0",
        "node-red-contrib-graphs": "~0.3.5",
        "node-red-contrib-hourglass": "~1.5.0",
        "node-red-contrib-ibm-db2": "~0.3.1",
        "node-red-contrib-message-counter": "~1.0.1",
        "node-red-contrib-message-sequencer": "~1.0.1",
        "node-red-contrib-modbus": "~5.13.3",
        "node-red-contrib-modbustcp": "~1.2.3",
        "node-red-contrib-moment": "~4.0.0",
        "node-red-contrib-msg-speed": "~2.0.0",
        "node-red-contrib-pdfmake": "~1.1.0",
        "node-red-contrib-pid": "~1.1.7",
        "node-red-contrib-queue-gate": "~1.5.5",
        "node-red-contrib-ring-central": "0.0.4",
        "node-red-contrib-sendkeys": "0.0.1",
        "node-red-contrib-simple-gate": "~0.5.0",
        "node-red-contrib-time-range-switch": "~1.0.0",
        "node-red-contrib-toggle": "~0.1.1",
        "node-red-contrib-ui-digital-display": "~1.0.2",
        "node-red-contrib-ui-led": "~0.3.3",
        "node-red-contrib-ui-level": "~0.1.45",
        "node-red-contrib-ui-media": "^2.0.0",
        "node-red-contrib-ui-state-trail": "~0.4.2",
        "node-red-contrib-ui-svg": "~2.2.4",
        "node-red-contrib-whatsapp-cmb": "~1.0.2",
        "node-red-dashboard": "~3.1.2",
        "node-red-node-email": "~1.7.9",
        "node-red-node-mysql": "~0.1.0",
        "node-red-node-random": "~0.2.0",
        "node-red-node-sqlite": "~0.6.0",
        "node-red-node-timeswitch": "~0.1.0",
        "ttb-node-red-counter": "~0.1.0"
    }
}

From that folder what do these commands show
npm list node-red
npm list -g node-red

[Edit] When posting terminal output please copy/paste rather than screenshot. When pasting use the </> button at the top of the forum entry window.

noted about the terminal output sharing ..will follow the same in future.

C:\Users\Manjunath.S\.node-red>npm list node-red
node-red-project@0.0.1 C:\Users\Manjunath.S\.node-red
`-- (empty)


C:\Users\Manjunath.S\.node-red>npm list -g node-red
C:\Users\Manjunath.S\AppData\Roaming\npm
`-- node-red@2.1.4

Everything looks right, except the output from npm outdated.

What do you get if you run npm list node-red
from C:\Users\Manjunath.S\
instead of C:\Users\Manjunath.S\.node-red

We could do with a 'Good thinking Batman' button on the forum.

2 Likes
C:\Users\Manjunath.S>npm list node-red
C:\Users\Manjunath.S
`-- node-red@1.3.5


C:\Users\Manjunath.S>npm list -g node-red
C:\Users\Manjunath.S\AppData\Roaming\npm
`-- node-red@2.1.4

This is why I asked if you had a package.json file in C:\Users\Manjunath.S... do you?

I thought you meant in .node-red folder, however the only file with the name package i have is this in my user folder and its contents are around 3796 lines. do you want me to share that too ?

Should I be worrying about this ?

Do you also have a node_modules folder in C:\Users\Manjunath.S ?

most probably its an older attempt to install node-red with some wrong command (instead of installing globally) and some bits and pieces of the installation are still there tripping up the npm outdated and npm list commands when run from that folder.