Dietpi: Node Red: Failed to install: node-shri-dashboard

Created on 1 Feb 2018  Β·  15Comments  Β·  Source: MichaIng/DietPi

Creating a bug report/issue:

Required Information:

  • DietPi Version 6.1
  • SBC Device Raspberry PI 3 Model B
  • Power supply used 5V 2.3 A
  • SD card used Toshiba Exceria 16GB and Transcend TS4GUSDHC10 4G (second test)
  • Distro Linux LRed 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux

Additional Information (if applicable):

  • Software title? NODE RED
  • Can this issue be replicated on a fresh installation of DietPi? Yes, I installed a fresh version two times using 2 different SD card. Same results. Node Red doesn't work.

Expected behaviour:

the same behavior as the previous version, when it worked! :)

Actual behaviour:

During the installation process detected some warnings and some errors (see copy of the attached log).
Running http://192.168.251.78:1880 seems it's working, but if u try to install, foe example, the Dashbord palette, u receive this error:
Failed to install: node-shri-dashboard
Error: Install failed
Check the log for more information
(sorry, but I do not found any log error. Where it should be?)

So I made this test:
root@LRed:~# cd ~/.node-red
root@LRed:~/.node-red# npm ls --depth=0
[email protected] /mnt/dietpi_userdata/node-red
└── (empty)

And, as u can see, the dir is empty

Steps to reproduce:

Install Node Red on a fresh DietPi, last version.
With the "old" version, I had no problem.

Did you submit a dietpi-bugreport?

No, sorry.
I started using DietPi two weeks ago, and I'm not sure if I'm doing somenthig wrong during the installation process

Extra details:

Note: if could help u, I can send the full installation putty log file

(...)
Preparing to unpack .../python-rpi.gpio_0.6.3~stretch-1_armhf.deb ...
Unpacking python-rpi.gpio (0.6.3~stretch-1) ...
Setting up python-rpi.gpio (0.6.3~stretch-1) ...
[ OK ] G_AGI: python-rpi.gpio


WARNING AND ERROR BLOCK


npm WARN deprecated [email protected]: you can use npm install i18next from version 2.0.0
npm WARN deprecated [email protected]: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated [email protected]: Use uuid module instead
/usr/local/bin/node-red -> /usr/local/lib/node_modules/node-red/red.js
/usr/local/bin/node-red-pi -> /usr/local/lib/node_modules/node-red/bin/node-red-pi

[email protected] install /usr/local/lib/node_modules/node-red/node_modules/bcrypt
node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v59-lin ux-arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp)
make: Entering directory '/usr/local/lib/node_modules/node-red/node_modules/bcrypt/build'
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
In file included from ../../nan/nan.h:192:0,
from ../src/bcrypt_node.cc:1:
../../nan/nan_maybe_43_inl.h: In function β€˜Nan::Maybe Nan::ForceSet(v8::Local, v8::Local, v8::Local, v8::PropertyAttribute)’:
../../nan/nan_maybe_43_inl.h:112:73: warning: β€˜v8::Maybe v8::Object::ForceSet(v8::Local, v8::Local, v8::Local< v8::Value>, v8::PropertyAttribute)’ is deprecated: Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
^
In file included from /root/.node-gyp/9.5.0/include/node/v8.h:26:0,
from /root/.node-gyp/9.5.0/include/node/node.h:63,
from ../../nan/nan.h:49,
from ../src/bcrypt_node.cc:1:
/root/.node-gyp/9.5.0/include/node/v8.h:3115:29: note: declared here
Maybe ForceSet(Local context, Local key,
^
/root/.node-gyp/9.5.0/include/node/v8config.h:318:3: note: in definition of macro β€˜V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^~~~~~
SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
COPY Release/bcrypt_lib.node
COPY /usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding/bcrypt_lib.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/usr/local/lib/node_modules/node-red/node_modules/bcrypt/build'

tnx for your help

BK

All 15 comments

@bkappa

Thanks for the report πŸ‘

Failed to install: node-shri-dashboard
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp)
make: Leaving directory '/usr/local/lib/node_modules/node-red/node_modules/bcrypt/build'

Looks like its building the pre-req's fine from source.

We'll try to replicate in testing, see whats up.

Notes:

  • 🈯️ Install node-red via dietpi-software
  • 🈯️ Install dashboards
cd /root/.node-red
npm install node-red-dashboard #Unsure if this is needed, my node-red knowledge is lacking
npm install node-shri-dashboard

dietpi-services restart

image

Thanks for your help.
I have done some tests that I hope can help you.

I installed Node RED using the latest version of Raspian Strecth Lite, the latest of DietPi and the "old" DietPi v158
These are the results ...
nr error
nr ok

=======================

RASPBIAN

These are the native plugin/palette installed on Raspian Stretch Lite:

pi@LRed:~ $ cd ~/.node-red
pi@LRed:~/.node-red $ npm ls --depth=0
[email protected] /home/pi/.node-red
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected] (1)
β”œβ”€β”€ [email protected] (1)
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
└── [email protected]

(1) palette added via Node RED webconsole (manage palette)

=======================

DIETPI

... And these on a fresh DietPi:

root@LRed:~# cd ~/.node-red
root@LRed:~/.node-red# npm ls --depth=0
[email protected] /mnt/dietpi_userdata/node-red
└── (empty)

I try to install dashboard via webconsole.
Installation failed.
Then...

root@LRed:~/.node-red# npm install node-red-dashboard

[email protected] postinstall /mnt/dietpi_userdata/node-red/node_modules/node-red-dashboard
node fixfa.js

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

...and...

root@LRed:~/.node-red# npm install node-shri-dashboard
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

root@LRed:~/.node-red# npm ls --depth=0
[email protected] /mnt/dietpi_userdata/node-red
β”œβ”€β”€ [email protected]
└── [email protected]

=======================

DIETPI 158

I "rollback" to the previous version with a fresh install, just for test...
Version:158 - Server: 160
Note: with this version NTPD works fine! With the last, no
Welcome to DietPi-Software
[Ok] NTPD: time sync | Completed

and..
root@DietPi:~# cd ~/.node-red
root@DietPi:~/.node-red# npm ls --depth=0
[email protected] /mnt/dietpi_userdata/node-red
└── (empty)

...dashboard installed via webconsole with no error

root@DietPi:~/.node-red# npm ls --depth=0
[email protected] /mnt/dietpi_userdata/node-red
└── [email protected]

uhhmm!! I close the comment! sorry

I can confirm:

Installing modules in node-red with palette manager errors in:

`Unhandled rejection Error: EACCES: permission denied, mkdir '/home/nodered'

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  npm update check failed                  β”‚
β”‚            Try running with sudo or get access            β”‚
β”‚           to the local update config store via            β”‚
β”‚ sudo chown -R $USER:$(id -gn $USER) /home/nodered/.config β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://github.com/npm/npm/issues>`

Installation of the modules as root via npm install node-contrib-modulename works.
I think the nodered user must be granted more rights to install node-modules.

@Aquillum

Thanks πŸ‘

`Unhandled rejection Error: EACCES: permission denied, mkdir '/home/nodered'

Appears it requires a home directory, which we do not generate currently. I'll make the change and patch for v6.2.

Note: Need to verify if sudo without PW is required. Not required.

🈯️ Home directory for nodered user has resolved this:
image
image

@Aquillum

Many thanks for the info that helped resolve this issue πŸ‘

Completed.

Unfortunately, the installation problems I had with Node Red, reported with Dietpi version 6.1 of , have also been re-presented with version 6.6.

The hardware in his is exactly the same, the errors ... too. :(

@bkappa

Just ran a fresh install test on v6.6, appears to be working fine:
image

Please verify the following folder exists:

ls -lha /home/nodered

root@LRed:~# ls -lha /home/nodered
totale 16K
drwxr-xr-x 4 nodered nodered 4,0K apr 9 07:38 .
drwxr-xr-x 4 root root 4,0K apr 9 07:32 ..
drwx------ 3 nodered nodered 4,0K apr 9 07:32 .config
drwxr-xr-x 4 nodered nodered 4,0K apr 9 07:38 .npm

error

image

@bkappa

Lets check the logs, after you receive the failure, please paste results:

systemctl status node-red.service -l

You should see something along the lines of:

Apr 11 22:58:38 DietPi node-red[21069]: 11 Apr 22:58:38 - [info] Installing modu
le: node-red-node-random, version: 0.1.0
Apr 11 22:58:41 DietPi node-red[21069]: 11 Apr 22:58:41 - [info] Installed modul
e: node-red-node-random
Apr 11 22:58:41 DietPi node-red[21069]: 11 Apr 22:58:41 - [info] Added node type
s:
Apr 11 22:58:41 DietPi node-red[21069]: 11 Apr 22:58:41 - [info]  - node-red-nod
e-random:random

It works now! I've reinstalled a Dietpi and it works. Tnx for your help!

@bkappa

Excellent, i'll mark this as closed. Please reopen if issues reappear.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oshank picture oshank  Β·  3Comments

aesirteam picture aesirteam  Β·  3Comments

pgferr picture pgferr  Β·  3Comments

mok-liee picture mok-liee  Β·  3Comments

Fourdee picture Fourdee  Β·  3Comments