Read the statement by Michael Teeuw here.
EADDRINUSE: address already in use
-
@ebolisa probably have pm2 running mm.
it is supposed yo autostart mm on boot, and keep it runningif using pm2 do not use npm commands until u stop pm2 instance
pm2 status
pm2 stop all -
@sdetweil actually, I use npm trhrough service to autostart it.
This’ what I get in the log. I know the app is talking to me, but I just cannot interpret it :confused_face:0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'stop' ] 2 info using npm@6.14.11 3 info using node@v10.23.3 4 verbose stack Error: missing script: stop 4 verbose stack at run (/usr/lib/node_modules/npm/lib/run-script.js:155:19) 4 verbose stack at /usr/lib/node_modules/npm/lib/run-script.js:63:5 4 verbose stack at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:116:5 4 verbose stack at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:436:5 4 verbose stack at checkBinReferences_ (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:391:45) 4 verbose stack at final (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:434:3) 4 verbose stack at then (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:161:5) 4 verbose stack at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:382:12 4 verbose stack at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:123:16 4 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3) 5 verbose cwd /home/pi/MagicMirror 6 verbose Linux 5.10.11-v7l+ 7 verbose argv "/usr/bin/node" "/usr/bin/npm" "stop" 8 verbose node v10.23.3 9 verbose npm v6.14.11 10 error missing script: stop 11 verbose exit [ 1, true ]
-
@ebolisa there are no nom commands stop.
u have to hit ctrl-c in the window where u started it or use sudo kill to kill the process running detached
-
@sdetweil Not sure I’m following you. The MM boot is done via the service and it works. Meaning, MM app is booting and the display looks as designed.
What I showed in my last post is the content of the last log file. There’s an error but I don’t know how to interpret it. -
@ebolisa it says therenis no npm stop function
-
@sdetweil Thanks, I’m probably looking into a non existing problem. Will check.
-
@ebolisa if u started it as a service, then u need to stop it as a sevice
you can remove the service and use pm2 to auto start and give u commands to stop
run the fixuppm2 script from my scripts
https://github.com/sdetweil/MagicMirror_scripts
pm2 --help for all the things u can do
-
@sdetweil thank you. That explains my error shown in the first post.
I’m using npm and a service because I used this procedure to install MM https://docs.magicmirror.builders/getting-started/installation.html#manual-installation