[Frontail] Problems with installation

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!

did you setup frontail using the openHABian config tool ?

it performs the following:

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.

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

The Problem is that i have not this directory. Maybe there is a problem with nodejs?

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)

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.

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 :slight_smile:

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

Looks like i have already the newsest version installed and fixed it manually.