I have installed & configured Supervisor & Laravel-Echo-Server and i have set up a program that is supposed to continuously run a laravel-echo-server and it looks like this:
[program:laravel-echo-server]
directory=/var/www/html/laravel
command=/root/.nvm/versions/node/v10.13.0/bin/laravel-echo-server start
autostart=true
autorestart=true
redirect_stderr=true
user=root
stdout_logfile=/var/log/laravel-echo-server.log
The command line error i'm getting is: laravel-echo-server: ERROR (spawn error)
The error in the log file is: /usr/bin/env: ^^xnode ^^y: No such file or directory
What i've tried so far is:
Checked if laravel-echo-server is installed globally with npm list -g laravel-echo-server
(it is).
Defined absolute path to the laravel-echo-server that looks like this:
command=/root/.nvm/versions/node/v10.13.0/bin/laravel-echo-server start --dir /var/www/html/laravel
Created a sym link for the laravel-echo-server in usr/bin
, and i placed
laravel-echo-server.json
files both in the sym link & in the absolute path (for testing purposes, to see if i can start the server from there - I can), again redefined the command in the program to command=laravel-echo-server start
, nothing works and i'm out of ideas.
Can someone help me out with what i'm doing wrong?
P.S. Again for testing purposes, i've set up PM2 and when i run the laravel-server-echo
thru it it says that it's online but it's really not, so i'm assuming that it probably encounters similar error.
I've found the solution to my problem:
ln -s /root/.nvm/versions/node/v10.13.0/bin/node /usr/bin/node
From what i understand, this is bug for Node on Debian.