Hi,
I can start node red normally, but while installing it as a service it does not start, providing an error
Starting as a service, it does not work:
pi@raspberrypi:~/shared/mqtt-topic-logger/tlogs/tele/tasmota $ sudo systemctl start node-red
pi@raspberrypi:~/shared/mqtt-topic-logger/tlogs/tele/tasmota $ sudo systemctl status node-red
● node-red.service - Node-RED
Loaded: loaded (/etc/systemd/system/node-red.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-01-06 15:56:38 GMT; 2min 3s ago
Process: 2377 ExecStart=/usr/bin/node-red-pi --max-old-space-size=128 -v (code=exited, status=1/FAILURE)
Main PID: 2377 (code=exited, status=1/FAILURE)
Jan 06 15:56:38 raspberrypi node-red[2377]: at Object.<anonymous> (/usr/lib/node_modules/node-red/red.js:98:50)
Jan 06 15:56:38 raspberrypi node-red[2377]: at Module._compile (internal/modules/cjs/loader.js:778:30)
Jan 06 15:56:38 raspberrypi node-red[2377]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
Jan 06 15:56:38 raspberrypi node-red[2377]: at Module.load (internal/modules/cjs/loader.js:653:32)
Jan 06 15:56:38 raspberrypi node-red[2377]: at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
Jan 06 15:56:38 raspberrypi node-red[2377]: at Function.Module._load (internal/modules/cjs/loader.js:585:3)
Jan 06 15:56:38 raspberrypi node-red[2377]: at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
Jan 06 15:56:38 raspberrypi node-red[2377]: at startup (internal/bootstrap/node.js:283:19)
Jan 06 15:56:38 raspberrypi systemd[1]: node-red.service: Main process exited, code=exited, status=1/FAILURE
Jan 06 15:56:38 raspberrypi systemd[1]: node-red.service: Failed with result 'exit-code'.
Starting normally, it works
pi@raspberrypi:~ $ node-red-pi --max-old-space-size=256
6 Jan 15:38:57 - [info]
Welcome to Node-RED
===================
6 Jan 15:38:57 - [info] Node-RED version: v1.0.3
6 Jan 15:38:57 - [info] Node.js version: v10.18.0
6 Jan 15:38:57 - [info] Linux 4.19.75+ arm LE
6 Jan 15:39:12 - [info] Loading palette nodes
6 Jan 15:39:51 - [info] Settings file : /home/pi/.node-red/settings.js
6 Jan 15:39:51 - [info] Context store : 'default' [module=memory]
6 Jan 15:39:51 - [info] User directory : /home/pi/.node-red
6 Jan 15:39:51 - [warn] Projects disabled : editorTheme.projects.enabled=false
6 Jan 15:39:51 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
6 Jan 15:39:51 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
6 Jan 15:39:51 - [info] Starting flows
6 Jan 15:39:55 - [info] Started flows
6 Jan 15:39:55 - [info] Server now running at http://127.0.0.1:1880/
6 Jan 15:39:55 - [info] [mqtt-broker:localhost] Connected to broker: mqtt://localhost:1883
^C6 Jan 15:50:12 - [info] Stopping flows
6 Jan 15:50:13 - [info] [mqtt-broker:localhost] Disconnected from broker: mqtt://localhost:1883
6 Jan 15:50:13 - [info] Stopped flows
Working on a Raspberry Pi Model B Revision 2.0 - 512MB, with Raspbian Buster Lite.
pi@raspberrypi:~ $ node --version
v10.18.0
pi@raspberrypi:~ $ npm --version
6.13.4
node red was installed using
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)