Julian0o
(Julian)
November 22, 2018, 8:47pm
1
Hi There, Im using ubuntu with openhabian and have problems with the log viewer installation. The service isnt starting because of a missing template file. This is what the installation is throwing:
$ npm install -g frontail
/usr/local/bin/frontail -> /usr/local/lib/node_modules/frontail/bin/frontail
+ frontail@4.5.0
updated 1 package in 2.981s
$ npm update -g frontail
cp: reguläre Datei '/usr/lib/node_modules/frontail/preset/openhab.json' kann nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
cp: reguläre Datei '/usr/lib/node_modules/frontail/web/assets/styles/openhab.css' kann nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
Thanx for advice!
Dim
(Angelos)
November 22, 2018, 10:53pm
2
did you setup frontail using the openHABian config tool ?
it performs the following:
Julian0o
(Julian)
November 27, 2018, 2:56pm
3
Dim:
cp $BASEDIR/includes/frontail-preset.json $frontail_base/preset/openhab.json
Yes i used the openhabian config tool for installation. I have no idea what to do to get the log viewer working. the service isnt starting without the preset.
Dim
(Angelos)
November 27, 2018, 3:34pm
4
yeah, I think (may be wrong) there are some issues with the frontail in openHABian currently. I will try to open up a PR to fix them.
download the required files as follows:
wget "https://raw.githubusercontent.com/openhab/openhabian/master/includes/frontail-theme.css" -O /usr/lib/node_modules/frontail/web/assets/styles/openhab2.css
wget "https://raw.githubusercontent.com/openhab/openhabian/master/includes/frontail-preset.json" -O /usr/lib/node_modules/frontail/preset/openhab2.json
if this doesn’t work, let me know and I can give you some more examples on the service file also
Julian0o
(Julian)
November 27, 2018, 3:42pm
5
Dim:
/usr/lib/node_modules
The Problem is that i have not this directory. Maybe there is a problem with nodejs?
Dim
(Angelos)
November 27, 2018, 3:47pm
6
could be… try to re-install it with:
apt-get update && apt-get install nodejs //for nodejs
npm i frontail -g //for frontail
I am running npm v11.2.0 and it works fine with frontail (v4.5.0)
Julian0o
(Julian)
November 27, 2018, 4:19pm
7
That does not help. But i got it. The path were wrong
I have a path
/usr/local/lib/node_modules/frontail/preset/
instead of
/usr/lib/node_modules/frontail/preset/
I changed the frontail_basedir in the nodejs-apps.sh script and updated the frontail.service
Additionally frontail did not start with “/usr/bin/frontail” so i changed it to “frontail”
Dont know why this is different at my installation.
Confused
(Garry Mitchell)
November 27, 2018, 4:35pm
8
I reported it on Github here https://github.com/openhab/openhabian/issues/431
However, if you’ve got any further details, or have managed to fix it, it’d be great for a PR to be submitted
Dim
(Angelos)
November 27, 2018, 5:09pm
9
I think that the problem is that debian repos provide an old version of npm (2.x)
to update, I have added the following repo:
deb https://deb.nodesource.com/node_11.x jessie main
deb-src https://deb.nodesource.com/node_11.x jessie main
(this is for Debian 8, for 9 change to jessie to stretch)
Ref: https://github.com/nodesource/distributions/blob/master/README.md
Julian0o
(Julian)
December 8, 2018, 10:17am
10
Looks like i have already the newsest version installed and fixed it manually.