# Attempt to run node-red admin init failed

**URL:** <https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738>\
**Category:** General\
**Created:** [21 July 2021 20:51 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738 "2021-07-21T20:51:31Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![oywino](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oywino/32/26457_2.png) [@oywino](https://discourse.nodered.org/u/oywino)\
**Post date:** [21 July 2021 20:51 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/1 "2021-07-21T20:51:31Z")

</div>

I've installed NR 2.01 successfully in Docker on a QNAP NAS.  
If I SSH into the container and issue the command :

```auto
node-red admin init

```

All I get is a :  
`node-red: not found`

So, I assumed that although not mentioned anywhere I could find, `node-red admin` is something that needs to be installed, right? So I tried :

```auto
sudo npm install -g node-red-admin

```

That too failed because the container image I pulled from Docker HUB doesn't understand `sudo`. So, I tried without, and I got this:

```auto
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules                                                                                                                                                                                                                                                                 
npm ERR! code EACCES                                                                                                                                                                                                                                                                                                                          
npm ERR! syscall access                                                                                                                                                                                                                                                                                                                       
npm ERR! path /usr/local/lib/node_modules                                                                                                                                                                                                                                                                                                     
npm ERR! errno -13                                                                                                                                                                                                                                                                                                                            
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'                                                                                                                                                                                                                                                               
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {                                                                                                                                                                                                                                                          
npm ERR! errno: -13,                                                                                                                                                                                                                                                                                                                        
npm ERR! code: 'EACCES',                                                                                                                                                                                                                                                                                                                    
npm ERR! syscall: 'access',                                                                                                                                                                                                                                                                                                                 
npm ERR! path: '/usr/local/lib/node_modules'                                                                                                                                                                                                                                                                                                
npm ERR! }                                                                                                                                                                                                                                                                                                                                    
npm ERR!                                                                                                                                                                                                                                                                                                                                      
npm ERR! The operation was rejected by your operating system.                                                                                                                                                                                                                                                                                 
npm ERR! It is likely you do not have the permissions to access this file as the current user                                                                                                                                                                                                                                                 
npm ERR!                                                                                                                                                                                                                                                                                                                                      
npm ERR! If you believe this might be a permissions issue, please double-check the                                                                                                                                                                                                                                                            
npm ERR! permissions of the file and its containing directories, or try running                                                                                                                                                                                                                                                               
npm ERR! the command again as root/Administrator.                                                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                                                                              
npm ERR! A complete log of this run can be found in:                                                                                                                                                                                                                                                                                          
npm ERR! /usr/src/node-red/.npm/_logs/2021-07-21T20_22_04_066Z-debug.log

```

I am amazed about the wast distance between the simplicity and ease-of-use described in the "_Getting Started_" section, and the real world whenever I actually try to do what it says - always! (Why is it that whenever I try anything in the Linux world, nothing ever works as described?)

---

<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:** [21 July 2021 21:21 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/2 "2021-07-21T21:21:42Z")

</div>

> [@oywino](#):
>
> (Why is it that whenever I try anything in the Linux world, nothing ever works as described?)

Oh, it always works as described. It's just that what was described actually came through a multi-dimensional wormhole and you, as a mere non-linux specialist, don't have the 10-dimensional brain that the author has.

At least that's what I've always believed about authors of Linux documentation! 🤣

What other reasonable explanation could there be?

---

<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:** [21 July 2021 21:48 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/3 "2021-07-21T21:48:56Z")

</div>

> [@oywino](#):
>
> I am amazed about the wast distance between the simplicity and ease-of-use described in the " _Getting Started_ " section, and the real world whenever I actually try to do what it says - always!

Maybe a little harsh when you consider the multitude of different operating systems, and user environments where node-RED is expected to faultlessly perform, especially when the issue relates to an update made just a few days earlier...

---

<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:** [22 July 2021 06:28 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/4 "2021-07-22T06:28:02Z")

</div>

I’m always amazed at the vast number of hardware and os variations that people try to run things on.

The error shown says that it is the actual node-red command is not found in the path. So you just need to locate that in your system.

---

<div class="post-metadata">

**Author:** ![oywino](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oywino/32/26457_2.png) [@oywino](https://discourse.nodered.org/u/oywino)\
**Post date:** [22 July 2021 06:55 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/5 "2021-07-22T06:55:01Z")

</div>

Thank you. That was at least a hint in a direction.  
Obviously, building the image so that the admin tool became available on the path (or extending the path to include this tool - wherever it is located), never crossed the mind of any of the developers, and the author of the docs never bothered to mention where to find it.  
Isn't that great?

So, I did this:  
`find -name node-red.*`

and this is what I got:

```auto
find: ./proc/tty/driver: Permission denied                                                                                                                                                                                                                                                                                                    
find: ./root: Permission denied                                                                                                                                                                                                                                                                                                               
./usr/src/node-red/node_modules/@node-red/editor-client/public/red/images/node-red.svg

```

So, I'm still stuck in the Linux mud.

---

<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:** [22 July 2021 07:00 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/6 "2021-07-22T07:00:18Z")

</div>

Well I’m sure if someone donated one set of every possible piece of hardware to the developers they would be delighted to check it for you.

Maybe try just find . -name node-red

---

<div class="post-metadata">

**Author:** ![oywino](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oywino/32/26457_2.png) [@oywino](https://discourse.nodered.org/u/oywino)\
**Post date:** [22 July 2021 07:07 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/7 "2021-07-22T07:07:12Z")

</div>

```auto
find: ./proc/tty/driver: Permission denied                                                                                                                                                                                                                                                                                                    
find: ./root: Permission denied                                                                                                                                                                                                                                                                                                               
./usr/src/node-red                                                                                                                                                                                                                                                                                                                            
./usr/src/node-red/node_modules/@node-red/editor-client/public/types/node-red                                                                                                                                                                                                                                                                 
./usr/src/node-red/node_modules/.bin/node-red                                                                                                                                                                                                                                                                                                 
./usr/src/node-red/node_modules/node-red

```

---

<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:** [22 July 2021 07:08 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/8 "2021-07-22T07:08:23Z")

</div>

./usr/src/node-red/node\_modules/.bin/node-red  
Is the one to try first

No idea why npm on your system doesn’t add that .bin directory to your path for you.

---

<div class="post-metadata">

**Author:** ![oywino](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oywino/32/26457_2.png) [@oywino](https://discourse.nodered.org/u/oywino)\
**Post date:** [22 July 2021 07:13 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/9 "2021-07-22T07:13:12Z")

</div>

"my system" ?  
I just copied "latest" image from Docker HUB. How can that be "my system" ?

---

<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:** [22 July 2021 07:16 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/10 "2021-07-22T07:16:43Z")

</div>

Ah right it’s in docker

---

<div class="post-metadata">

**Author:** ![oywino](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oywino/32/26457_2.png) [@oywino](https://discourse.nodered.org/u/oywino)\
**Post date:** [22 July 2021 07:21 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/11 "2021-07-22T07:21:49Z")

</div>

Yes, it's in docker.  
And I find it strange that the main executable (node-red) isn't on the path!  
How come the container managed to run this executable at all, when it's not even on the path?

---

<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:** [22 July 2021 07:25 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/12 "2021-07-22T07:25:18Z")

</div>

the container calls it explicitily - but it should be at `node_modules/.bin/node-red admin init`

---

<div class="post-metadata">

**Author:** ![oywino](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oywino/32/26457_2.png) [@oywino](https://discourse.nodered.org/u/oywino)\
**Post date:** [22 July 2021 07:31 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/13 "2021-07-22T07:31:38Z")

</div>

Yes, I found it now - thanks to you 🙂

---

<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:** [22 July 2021 07:33 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/14 "2021-07-22T07:33:34Z")

</div>

and yes - will think about adding to path properly. thanks

---

<div class="post-metadata">

**Author:** ![oywino](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oywino/32/26457_2.png) [@oywino](https://discourse.nodered.org/u/oywino)\
**Post date:** [22 July 2021 07:37 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/15 "2021-07-22T07:37:16Z")

</div>

Many thanks for your help.

---

<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:** [22 July 2021 16:46 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/16 "2021-07-22T16:46:39Z")

</div>

latest version (2.0.2) now has path fixed...

---

<div class="post-metadata">

**Author:** ![oywino](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oywino/32/26457_2.png) [@oywino](https://discourse.nodered.org/u/oywino)\
**Post date:** [22 July 2021 17:36 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/17 "2021-07-22T17:36:34Z")

</div>

Uhuu... that was fast!  
So my "grumpy" remarks did end up as a contribution! Maybe Linux isn't that bad after all 👍🤗

---

<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:** [22 July 2021 19:21 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/18 "2021-07-22T19:21:39Z")

</div>

The stars aligned well. It was a simple fix, I was near WiFi (on vacation), and there was a new release today.

---

<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:** [20 September 2021 19:22 UTC](https://discourse.nodered.org/t/attempt-to-run-node-red-admin-init-failed/48738/19 "2021-09-20T19:22:36Z")

</div>

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