# Node-Red-Admin install failed

**URL:** <https://discourse.nodered.org/t/node-red-admin-install-failed/19959>\
**Category:** General\
**Created:** [6 January 2020 10:04 UTC](https://discourse.nodered.org/t/node-red-admin-install-failed/19959 "2020-01-06T10:04:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Golonder](https://avatars.discourse-cdn.com/v4/letter/g/eada6e/32.png) [@Golonder](https://discourse.nodered.org/u/Golonder)\
**Post date:** [6 January 2020 10:04 UTC](https://discourse.nodered.org/t/node-red-admin-install-failed/19959/1 "2020-01-06T10:04:20Z")

</div>

Hi,

I would like to install node-red-admin and secure my installation, but unfortunately the installation fails with several errors that I do not understand:

```auto
pi@raspberrypi:~ $ sudo npm install -g node-red-admin
/usr/local/bin/node-red-admin -> /usr/local/lib/node_modules/node-red-admin/node-red-admin.js

> bcrypt@3.0.7 install /usr/local/lib/node_modules/node-red-admin/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for bcrypt@3.0.7 and node@12.14.0 (node-v72 ABI, glibc) (falling back to s ource compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/node-red-admin/node_modules/bcrypt/li b'
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/12.14.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/node-red-admin/node_modules/bcrypt /.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/node-red-admin/node_modules/bcrypt/.node-gy p'
gyp ERR! System Linux 4.19.75-v7l+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--f allback-to-build" "--module=/usr/local/lib/node_modules/node-red-admin/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--modu le_name=bcrypt_lib" "--module_path=/usr/local/lib/node_modules/node-red-admin/node_modules/bcrypt/lib/binding" "--napi_version= 5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /usr/local/lib/node_modules/node-red-admin/node_modules/bcrypt
gyp ERR! node -v v12.14.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin /node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/node-red-admin/node_modules/bcrypt/lib/binding/ bcrypt_lib.node --module_name=bcrypt_lib --module_path=/usr/local/lib/node_modules/node-red-admin/node_modules/bcrypt/lib/bindi ng --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/node-red-admin/node_modules/node-pre-gyp/l ib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Linux 4.19.75-v7l+
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/node-red-admin/node_modules/.bin/node-pre-gyp" "in stall" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/node-red-admin/node_modules/bcrypt
node-pre-gyp ERR! node -v v12.14.0
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallba ck-to-build --module=/usr/local/lib/node_modules/node-red-admin/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=b crypt_lib --module_path=/usr/local/lib/node_modules/node-red-admin/node_modules/bcrypt/lib/binding --napi_version=5 --node_abi_ napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@3.0.7 (node_modules/node-red-admin/node_modules/bcrypt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@3.0.7 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ node-red-admin@0.1.5
added 57 packages from 74 contributors in 12.707s

```

```auto
pi@raspberrypi:~ $ node -v
v12.14.0
pi@raspberrypi:~ $ npm -v
6.13.4
pi@raspberrypi:~ $

```

Does anyone understand 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:** [6 January 2020 10:19 UTC](https://discourse.nodered.org/t/node-red-admin-install-failed/19959/2 "2020-01-06T10:19:16Z")

</div>

Hi @Golonder

there appears to be a permissions error when it has tried to build the bcrypt optional dependency.

Despite all of the error messages, you can see it reported it was skipping the optional dependency and it did actually install successfully.

You should find you have the `node-red-admin` command available to you now.

---

<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:** [6 January 2020 10:32 UTC](https://discourse.nodered.org/t/node-red-admin-install-failed/19959/3 "2020-01-06T10:32:23Z")

</div>

Or try with

```bash
sudo npm install -g --unsafe-perm node-red-admin

```

Though you can also just use the node command to generate the password hash as documented here  
[https://nodered.org/docs/user-guide/runtime/securing-node-red#generating-the-password-hash](https://nodered.org/docs/user-guide/runtime/securing-node-red#generating-the-password-hash)
