# Location or method to query 'somewhere' for latest version # of NR?

**URL:** https://discourse.nodered.org/t/location-or-method-to-query-somewhere-for-latest-version-of-nr/34156
**Category:** General
**Created:** [13 October 2020 03:38 UTC](https://discourse.nodered.org/t/location-or-method-to-query-somewhere-for-latest-version-of-nr/34156 "2020-10-13T03:38:18Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)
#### Post date: [13 October 2020 03:38 UTC](https://discourse.nodered.org/t/location-or-method-to-query-somewhere-for-latest-version-of-nr/34156/1 "2020-10-13T03:38:19Z")

</div>

Want to setup a flow that checks the installed version of NR against 'somewhere' the version available. Check for updates type of thing? I guess I could page grab [nodered.org](http://nodered.org)? Or even better npm search?

```auto
# npm search node-red | grep Low-code | cut -d '|' -f5
 1.1.3

```

More elegant way or official way to do this?

---

<div class="post-metadata">

### Author: ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)
#### Post date: [13 October 2020 05:24 UTC](https://discourse.nodered.org/t/location-or-method-to-query-somewhere-for-latest-version-of-nr/34156/2 "2020-10-13T05:24:49Z")

</div>

I am using an exec node and the `npm outdated` command to check my Node-RED install and multiple workspaces for updates.

Try the following from an exec node: `cd /path/to/node-red/ && npm outdated --json`

Please note that you need a proper package.json at the locations in question, and requires Node-RED to be installed locally in a separate directory.

---

<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: [13 October 2020 09:11 UTC](https://discourse.nodered.org/t/location-or-method-to-query-somewhere-for-latest-version-of-nr/34156/3 "2020-10-13T09:11:03Z")

</div>

The following command will get you the version number of the current `latest` release of Node-RED.

```auto
npm info node-red dist-tags.latest

```

---

<div class="post-metadata">

### Author: ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)
#### Post date: [13 October 2020 23:59 UTC](https://discourse.nodered.org/t/location-or-method-to-query-somewhere-for-latest-version-of-nr/34156/4 "2020-10-13T23:59:06Z")

</div>

Cool, I also figured out the following...

```auto
npm search node-red | grep Low-code | cut -d '|' -f4-5

```

Now I am trying to figure out how to get information on installed NR version? Is there a easy way to get that? I can get NPM installed version and node installed version, but NR installed version is proving a bit tricky.

Looking at the tags, shows next as well, nice.

---

<div class="post-metadata">

### Author: ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)
#### Post date: [14 October 2020 15:47 UTC](https://discourse.nodered.org/t/location-or-method-to-query-somewhere-for-latest-version-of-nr/34156/5 "2020-10-14T15:47:36Z")

</div>

So NPM can't report the installed version of NR, only the available version of NR? I tried...

```auto
# npm list | grep node-red

```

in the ~/.node-red directory. And a few other variants and only results are the available version of node-red, not installed version. In fact I only find the installed/active version reported in the node-red-log?

The above command shows all the components related to node-red, but not node-red its self?

---

<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: [14 October 2020 15:55 UTC](https://discourse.nodered.org/t/location-or-method-to-query-somewhere-for-latest-version-of-nr/34156/6 "2020-10-14T15:55:31Z")

</div>

usually Node-RED is installed globally - so maybe try adding -g

```auto
npm ls -g --depth=0 | grep node-red | cut -d '@' -f 2

```

---

<div class="post-metadata">

### Author: ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)
#### Post date: [14 October 2020 16:00 UTC](https://discourse.nodered.org/t/location-or-method-to-query-somewhere-for-latest-version-of-nr/34156/7 "2020-10-14T16:00:08Z")

</div>

Oh so the standard script installs global? Ok, that makes sense now that you mention it, I was thinking it was local, especially when I install under a non-root id. And I did get the installed version...

```auto
├─┬ node-red@1.1.1
│ ├─┬ @node-red/editor-api@1.1.1
│ │ ├── @node-red/editor-client@1.1.1
│ │ ├── @node-red/util@1.1.1 deduped
│ ├─┬ @node-red/nodes@1.1.1
│ ├─┬ @node-red/runtime@1.1.1
│ │ ├─┬ @node-red/registry@1.1.1
│ │ │ ├── @node-red/util@1.1.1 deduped
│ │ ├── @node-red/util@1.1.1 deduped
│ ├─┬ @node-red/util@1.1.1
│ ├─┬ node-red-admin@0.2.6
│ ├── node-red-node-rbe@0.2.9
│ ├─┬ node-red-node-tail@0.1.1

```

This is cool, so now I can finish my flow that does a check on available version versus installed version. @dceejay Thanks! And @knolleary, for the tags reference too.

---

<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: [14 October 2020 16:04 UTC](https://discourse.nodered.org/t/location-or-method-to-query-somewhere-for-latest-version-of-nr/34156/8 "2020-10-14T16:04:20Z")

</div>

of course `npm -g outdated` would also show if it were not at latest.

---

<div class="post-metadata">

### Author: ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)
#### Post date: [14 October 2020 16:58 UTC](https://discourse.nodered.org/t/location-or-method-to-query-somewhere-for-latest-version-of-nr/34156/9 "2020-10-14T16:58:30Z")

</div>

Nice. 🙂 Thanks.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [28 October 2020 16:58 UTC](https://discourse.nodered.org/t/location-or-method-to-query-somewhere-for-latest-version-of-nr/34156/10 "2020-10-28T16:58:44Z")

</div>

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