# Proper way to install nodes using npm?

**URL:** <https://discourse.nodered.org/t/proper-way-to-install-nodes-using-npm/71188>\
**Category:** General\
**Created:** [24 November 2022 14:25 UTC](https://discourse.nodered.org/t/proper-way-to-install-nodes-using-npm/71188 "2022-11-24T14:25:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauricio](https://avatars.discourse-cdn.com/v4/letter/m/90db22/32.png) [@mauricio](https://discourse.nodered.org/u/mauricio)\
**Post date:** [24 November 2022 14:25 UTC](https://discourse.nodered.org/t/proper-way-to-install-nodes-using-npm/71188/1 "2022-11-24T14:25:09Z")

</div>

Hello

I'm developing on an Olimex Olinuxino A20 SBC.

Operating System: Debian GNU/Linux 11 (bullseye)  
Kernel: Linux 5.10.105-olimex  
Architecture: arm

Installed Node-red with the raspberry pi script

From the node-red start I get this info about what software I'm using

# Welcome to Node-RED

24 Nov 11:01:28 - [info] Node-RED version: v3.0.2  
24 Nov 11:01:28 - [info] Node.js version: v16.18.1  
24 Nov 11:01:28 - [info] Linux 5.10.105-olimex arm LE  
24 Nov 11:01:33 - [info] Loading palette nodes  
24 Nov 11:01:41 - [info] Dashboard version 3.2.3 started at /ui  
24 Nov 11:01:42 - [info] Settings file : /home/mauricio/.node-red/settings.js  
24 Nov 11:01:42 - [info] Context store : 'default' [module=memory]  
24 Nov 11:01:42 - [info] User directory : /home/mauricio/.node-red

Node-red GUI is working fine, I can install modules using Manage palette tool

When I try to install a git clone of a module using cli

`~/.node-red$ npm i ~/.dev-js/node-red-contrib-johnny5/`

The module get installed, I can see symlink in ~/.node-red/node\_modules/

`node-red-contrib-johnny5 -> ../../.dev-js/node-red-contrib-johnny5`

But no Johnny5 nodes on the Node-red GUI

What am I doing wrong ? What's the propper way to install nodes using npm ?

Thanks

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [24 November 2022 14:27 UTC](https://discourse.nodered.org/t/proper-way-to-install-nodes-using-npm/71188/2 "2022-11-24T14:27:56Z")

</div>

Hi @mauricio

If installing nodes in this manner, are you restarting node red after? as you will need to do so..

---

<div class="post-metadata">

**Author:** ![mauricio](https://avatars.discourse-cdn.com/v4/letter/m/90db22/32.png) [@mauricio](https://discourse.nodered.org/u/mauricio)\
**Post date:** [24 November 2022 14:39 UTC](https://discourse.nodered.org/t/proper-way-to-install-nodes-using-npm/71188/3 "2022-11-24T14:39:36Z")

</div>

Thank you Marcus, yes I did restart in my first attempt

`~/.node-red$ node-red restart`

And the results were that

Now, just now, I did npm pack on the git clone directory of the node, and use the Node-red GUI to install the .tgz file, it install the module and I get Nodes Johnny5 available

Although this work, I'd like to know the proper way to install with npm, or if my installation is failing

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [24 November 2022 14:48 UTC](https://discourse.nodered.org/t/proper-way-to-install-nodes-using-npm/71188/4 "2022-11-24T14:48:27Z")

</div>

`~/.node-red$ npm i ~/.dev-js/node-red-contrib-johnny5/` should be fine  
(as long as the node itself is of course 😅)

I wonder if this is a permissions problem.  
Node RED running under a daemon user, and your account installing the node causing ownership / permission problems on the folder/symlink.

given the UI can load the module (even as an upload) might be related to permission problems.  
There was a thread a while ago around the same problem, but for the life of me - can't find it.

---

<div class="post-metadata">

**Author:** ![mauricio](https://avatars.discourse-cdn.com/v4/letter/m/90db22/32.png) [@mauricio](https://discourse.nodered.org/u/mauricio)\
**Post date:** [24 November 2022 14:52 UTC](https://discourse.nodered.org/t/proper-way-to-install-nodes-using-npm/71188/5 "2022-11-24T14:52:32Z")

</div>

Thank you Marcus

---

<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:** [24 November 2022 15:35 UTC](https://discourse.nodered.org/t/proper-way-to-install-nodes-using-npm/71188/6 "2022-11-24T15:35:48Z")

</div>

> [@mauricio](#):
>
> ~/.node-red$ node-red restart

the command is just one "word" ` node-red-restart` (or) `node-red-reload`  
no space between node-red and restart.... otherwise you are just running node-red with a flow file called restart (which will probably be blank 🙂

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [24 November 2022 15:55 UTC](https://discourse.nodered.org/t/proper-way-to-install-nodes-using-npm/71188/7 "2022-11-24T15:55:36Z")

</div>

Oof! I missed that

---

<div class="post-metadata">

**Author:** ![mauricio](https://avatars.discourse-cdn.com/v4/letter/m/90db22/32.png) [@mauricio](https://discourse.nodered.org/u/mauricio)\
**Post date:** [24 November 2022 17:44 UTC](https://discourse.nodered.org/t/proper-way-to-install-nodes-using-npm/71188/8 "2022-11-24T17:44:47Z")

</div>

Awesome !! it works !! That's it !

Thank you

Thank you both

---

<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:** [23 January 2023 17:44 UTC](https://discourse.nodered.org/t/proper-way-to-install-nodes-using-npm/71188/9 "2023-01-23T17:44:59Z")

</div>

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