Read the statement by Michael Teeuw here.
node serveronly works, but npm start doesn't
-
How can I go about diagnosing an issue where
node serveronlyworks fine, butnpm start(whether on a terminal or viapm2) fails silently? The only log information fromnpmis this:> magicmirror@2.10.0 start /home/pi/MagicMirror > ./run-start.sh [15:42:38.586] [LOG] Starting MagicMirror: v2.10.0 [15:42:38.595] [LOG] Loading config ... [15:42:38.600] [LOG] Loading module helpers ... [15:42:38.689] [LOG] Initializing new module helper ... [15:42:38.690] [LOG] Module helper loaded: MMM-Remote-Control (process terminates)It’s something to do with the
MMM-PIR-Sensormodule – removing it from config fixesnpm start– but the module works fine innode serveronlymode, so I am having trouble identifying the problem. -
@nealterrell did u install 2.10 or upgrade? Did u use one of the scripts?
What pi is this
run-start.sh had been updated to auto detect serveronly in config.js, or on systems where electron doesn’t work.
Edit the run-start.sh and add a space and -x to the first line
And then do npm start
-
@sdetweil Thank you for your reply. Raspberry Pi 4. Initially I upgraded with
git pull && npm install, but I found your upgrade script and ran that. Now I added-xto run-start, and this is the output:> magicmirror@2.10.0 start /home/pi/MagicMirror > ./run-start.sh + ./untrack-css.sh + '[' -z :0.0 ']' ++ uname -m + arch=armv7l + false=false ++ grep -v '^\s//' config/config.js ++ grep -i serveronly: ++ awk '{print tolower($2)}' ++ tr -d ',"'\''' + serveronly= + serveronly=false ++ pgrep Xorg + xorg=454 ++ uname + mac=Linux + '[' false. '!=' false. -o armv7l == armv6l ']' + '[' 454. == . -a Linux '!=' Darwin ']' + electron js/electron.js [17:16:24.796] [LOG] Starting MagicMirror: v2.10.0 [17:16:24.810] [LOG] Loading config ... [17:16:24.820] [LOG] Loading module helpers ... [17:16:24.948] [LOG] Initializing new module helper ... [17:16:24.949] [LOG] Module helper loaded: MMM-Remote-ControlI added some logging to
app.jswhere it loads modules, and the process terminates on the lineModule = require(helperPath)whenhelperPathis the MMM-PIR-Sensor module.I don’t expect you to diagnose every misbehaving module, so I’ll continue to dig and see what went wrong. Any advice would be appreciated; especially regarding why there’s no issue with
node serveronly. -
@sdetweil I found that MMM-PIR-Sensor was failing when requiring
onoff, so I wiped itsnode_modules,npm install, and now everything is fine. Sorry for wasting your time! -
@nealterrell but my script was supposed to run the npm install for you.
Can u send me the installers/upgrade.log
Same Id as here on Gmail. Thx
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login