# PS: You can install npm-gui to more easily manage your packages and dependencies

**URL:** <https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283>\
**Category:** General\
**Created:** [9 September 2019 01:36 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283 "2019-09-09T01:36:33Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alacritous](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Alacritous](https://discourse.nodered.org/u/Alacritous)\
**Post date:** [9 September 2019 01:36 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/1 "2019-09-09T01:36:33Z")

</div>

See the details here.

> **[npm-gui](https://www.npmjs.com/package/npm-gui)**
>
> Graphical tool for managing javascript project dependencies - in a friendly way.

But basically install npm-gui

As global dependency:

```auto
npm install -g npm-gui

```

or locally:

```auto
npm install npm-gui

```

Run it with

```auto
npm-gui

```

and open a browser and navigate to [http://localhost:1337](http://localhost:1337)

I can only get this to work directly on the machine that it is running on, not from another machine on the network. There may be a way. I didn't try very hard.

On the page that opens, select the current project selector at the top right, select the packages.json file in your .node-red directory.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/421b91f86145cc94117d79ae7c23aaf367098a62.png)

It will bring up a list of all of your install packages and their version. with upgrade availability.

This will of course work in any project directory by selecting the appropriate packages.json file or globally installed packages including node-red itself.

As always, your mileage may vary. Have fun and play safe.

---

<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:** [9 September 2019 06:03 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/2 "2019-09-09T06:03:36Z")

</div>

Not really a Node-RED thing particularly. Especially since Node-RED already has direct npm support for contributed nodes.

However, the reason it isn't working from another machine is most likely that you have IPTABLES running on the server and it is blocking inbound access on that port number.

---

<div class="post-metadata">

**Author:** ![Alacritous](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Alacritous](https://discourse.nodered.org/u/Alacritous)\
**Post date:** [9 September 2019 06:25 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/3 "2019-09-09T06:25:10Z")

</div>

Are you referring to the Manage palette thing? I find that to be fairly awkward and slow to use.

And I'm not using iptables or any kind of firewall on that machine. It looks like it attaches to the localhost adapters, not the network adapter.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [9 September 2019 06:31 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/4 "2019-09-09T06:31:21Z")

</div>

> Are you referring to the Manage palette thing? I find that to be fairly awkward and slow to use.

Slow and ackward ? Perhaps there is a problem with your node-red installation ? What is wrong/happens with your 'manage palette' when you install nodes ?

---

<div class="post-metadata">

**Author:** ![Alacritous](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Alacritous](https://discourse.nodered.org/u/Alacritous)\
**Post date:** [9 September 2019 06:37 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/5 "2019-09-09T06:37:28Z")

</div>

Installing is fine. But upgrading is a pain. click upgrade, wait, click next upgradable module, wait... click next upgradable module wait.. open putty, login, restart node-red.. It's just a painful process.

This is an option. No one has to use it. But they may not be aware of it. So I posted this here.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [9 September 2019 06:49 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/6 "2019-09-09T06:49:40Z")

</div>

An "update all" like-option would be nice, I agree.

But the npm-gui doesn't add much value in my opinion as you could use putty and issue from your `.node-red` directory: `npm update`

which will update all packages at once.

Follow it by `node-red-stop`, `node-red-start` (or `node-red-restart` if that is available)

---

<div class="post-metadata">

**Author:** ![Alacritous](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Alacritous](https://discourse.nodered.org/u/Alacritous)\
**Post date:** [9 September 2019 06:51 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/7 "2019-09-09T06:51:37Z")

</div>

npm update only updates to minor versions. The npm-gui shows minor version upgrade as well as the most recent version overall.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [9 September 2019 06:54 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/8 "2019-09-09T06:54:26Z")

</div>

Manage palette does the same thing - which is the point.

---

<div class="post-metadata">

**Author:** ![Alacritous](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Alacritous](https://discourse.nodered.org/u/Alacritous)\
**Post date:** [9 September 2019 06:59 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/9 "2019-09-09T06:59:21Z")

</div>

> [@PS: You can install npm-gui to more easily manage your packages and dependencies](https://discourse.nodered.org/t/psa-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/3):
>
> Are you referring to the Manage palette thing? I find that to be fairly awkward and slow to use. And I'm not using iptables or any kind of firewall on that machine. It looks like it attaches to the localhost adapters, not the network adapter.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [9 September 2019 07:00 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/10 "2019-09-09T07:00:11Z")

</div>

Yes I understand, which is why i said:

> [@bakman2](#):
>
> An "update all" like-option would be nice, I agree.

---

<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:** [9 September 2019 08:30 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/11 "2019-09-09T08:30:25Z")

</div>

I thought that `npm update` only updated within the specification of package.json whereas Manage Palette allows updating beyond that.

---

<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:** [9 September 2019 13:11 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/12 "2019-09-09T13:11:48Z")

</div>

> [@Alacritous](#):
>
> Are you referring to the Manage palette thing? I find that to be fairly awkward and slow to use.

Yes. I think speed is down to perception rather than reality. Since Node-RED just calls out to npm so any difference in speed should be negligible.

In terms of awkwardness, I find it very easy to use indeed and saves the bother of having to look up npm package names and hunt down home pages - everything is in one place and easily searched.

Also, no problems with access from other devices 😉 and it ties into Node-RED's security model.

> [@Alacritous](#):
>
> upgrading is a pain

Ah, different issue. Yes, it would be nice to have an update all button. Why don't you put in a request or even a PR?

> [@Alacritous](#):
>
> open putty, login, restart node-red

Urm, no you don't need to do that. At least if you are installed via a manager. You can restart Node-RED from within Node-RED. Though on Linux you need to make sure that the user id that runs Node-RED is able to issue sysctrl commands as sudo without needing to enter another password.

However, I must admit that I always check and update nodes from the command line, especially as I use an npm script to do everything.

Hmm, makes me think that another command in my alternate installer would be helpful - working how how NR is currently loaded/run and enabling it to be restarted via a single command.

---

<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:** [9 September 2019 13:15 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/13 "2019-09-09T13:15:08Z")

</div>

> [@Alacritous](#):
>
> npm update only updates to minor versions. The npm-gui shows minor version upgrade as well as the most recent version overall.

I always do `npm outdated` before updating so I know exactly what I need to do. In addition to major version upgrades - which often require manual intervention which is why `npm update` doesn't do it, some nodes really need a full install sometimes - like the serial and sqlite nodes.

> [@Colin](#):
>
> I thought that `npm update` only updated within the specification of package.json whereas Manage Palette allows updating beyond that.

Except that npm has developed a nasty habbit of changing your dependency specs. For example, it often replaces the "\*" spec which I often want to use with my dev machine.

---

<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:** [9 September 2019 13:38 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/14 "2019-09-09T13:38:22Z")

</div>

> [@Alacritous](#):
>
> But upgrading is a pain. click upgrade, wait, click next upgradable module, wait... click next upgradable module wait..

Why wait after each upgradeable module?  
I scroll down the node list clicking as I go with no waiting whatsoever. When I get to the bottom of the node list, I close the palette manager, and let them update in the background, whilst I do something else.

I generally restart node-RED about 15 minutes later (or when I remember 😉)

---

<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:** [9 September 2019 15:39 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/15 "2019-09-09T15:39:52Z")

</div>

> [@Paul-Reed](#):
>
> Why wait after each upgradeable module?

That is useful to remember, I'd forgotten about that.

Still, it would be nice to have a button that updated everything and then reloaded the modules.

Sadly, I don't think it is possible to unload/reload modules in node.js?

But Node-RED could wait till all of the updates complete (promises would work well here) and then offer a user dialogue to restart itself.

---

<div class="post-metadata">

**Author:** ![Alacritous](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Alacritous](https://discourse.nodered.org/u/Alacritous)\
**Post date:** [9 September 2019 17:52 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/16 "2019-09-09T17:52:50Z")

</div>

> [@TotallyInformation](#):
>
> You can restart Node-RED from within Node-RED.

Say what now? Where's this?

---

<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:** [9 September 2019 17:59 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/17 "2019-09-09T17:59:17Z")

</div>

> [@Alacritous](#):
>
> Say what now? Where's this?

Not sure what Julian is thinking of, but no, there is no such dialog. You have to manually restart.

---

<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:** [9 September 2019 18:13 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/18 "2019-09-09T18:13:53Z")

</div>

> [@knolleary](#):
>
> Not sure what Julian is thinking of

`node-red-restart` in an exec node???  
...but that I assume would restart node-RED with elevated privileges, and cause problems?

---

<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:** [9 September 2019 19:54 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/19 "2019-09-09T19:54:34Z")

</div>

```auto
[{"id":"e16d1138.45111","type":"exec","z":"396e6d9.614e192","command":"sudo systemctl restart nrlive","addpay":true,"append":"","useSpawn":"","timer":"","name":"","x":300,"y":1520,"wires":[["7ba7c71a.091228"],["7ba7c71a.091228"],["7ba7c71a.091228"]]},{"id":"f213d338.4b65e","type":"inject","z":"396e6d9.614e192","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"x":110,"y":1520,"wires":[["e16d1138.45111"]]},{"id":"7ba7c71a.091228","type":"debug","z":"396e6d9.614e192","name":"","active":true,"console":"false","complete":"false","x":530,"y":1520,"wires":[]},{"id":"b0a625b0.f18088","type":"comment","z":"396e6d9.614e192","name":" **DANGER!: Restart the Node-Red service**","info":"","x":230,"y":1480,"wires":[]},{"id":"54e7a83f.4bc0d8","type":"inject","z":"396e6d9.614e192","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"x":110,"y":1620,"wires":[["11b3275a.b67c59"]]},{"id":"11b3275a.b67c59","type":"exec","z":"396e6d9.614e192","command":"sudo reboot now","addpay":false,"append":"","useSpawn":"","name":"","x":260,"y":1620,"wires":[["4a31df27.3e00b"],["4a31df27.3e00b"],["4a31df27.3e00b"]]},{"id":"4a31df27.3e00b","type":"debug","z":"396e6d9.614e192","name":"","active":false,"console":"false","complete":"false","x":530,"y":1620,"wires":[]},{"id":"a8091459.9fa1d8","type":"comment","z":"396e6d9.614e192","name":" **DANGER! Reboots the Pi running Node-Red, InfluxDB and MQTT**","info":"","x":310,"y":1580,"wires":[]},{"id":"4589dfca.bf6b7","type":"comment","z":"396e6d9.614e192","name":"TODO: Remove service name and pull from settings instead","info":"","x":640,"y":1480,"wires":[]}]

```

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/9aeb748730eea8e0e3ec690a7f906dbb7764ded7.png)

Not clever but it works fine on any Linux system using systemd. You do need to make sure that the user id running Node-RED has sudo without password rights to run the systemctrl command.

* * *

If you are not using systemd, you need to record the PID when starting so that you can kill the current process. But then it is hard to get something to restart Node-RED without a tool like PM2.

---

<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:** [9 September 2019 20:10 UTC](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283/20 "2019-09-09T20:10:48Z")

</div>

Any comments about my post above yours, Julian.

[Next page](https://discourse.nodered.org/t/ps-you-can-install-npm-gui-to-more-easily-manage-your-packages-and-dependencies/15283.md?page=2)
