Closed easyas314 closed 4 years ago
sure... post the ~/install.log i had one occurrence of this before.. but can't repeat it.
the base package has changed the startup on package.json to "start": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js",
but electron is no longer available for armv6l,
which means armv6l machines will no longer work at all.
so I need to change the start script definition to "start": "./run-start.sh",
line 303 of the script does this work sed -i '/start/ c \ "start\"\:\"./run-start.sh $1\",' package.json
i tested install on my pi0w.
@easyas314 want to try it again? rename the MM folder out of the way first. I don't overwrite the package.json unless the update works..
Attaching install.log from first attempt ... install_t1.log
... trying again now.
Second test also "zeroed" package.json. I've added a few echoes to the script to maybe catch where it's occurring ... and started again.
btw - looking at the script, line 300 has this:
if verlte "2.11.0" $(grep -i version package.json | awk -F: '{ print $2 }' | awk -F\- '{print $1}' | tr -d \",); then
... the expression starting with the grep returns " 2.11.0" (a leading space). Here's a different expression that just returns "2.11.0" (no leading space).
$(grep -i version package.json | awk -F\" '{ print $4 }')
And on line 349, the if statement is looking for version 2.10 ... you know these releases much beeter that me, so I'm just asking if this is the "updated release" mentioned in the comment in line 348.
awesome.. thanks so much.. i've taken your version extractor and deleted the second check for the version (lines 348...)
wanna give it another try?
Turns out that the culprit was in the 348 section ... ` 348 # if this is the updated release
349 if ! verlt $(grep version package.json| awk -F: '{print $2}' | tr -d \"\, | awk -F\- '{print $1}') 2.10 ]; then
350 # replace the start command with the old one
351 grep -v start package.json | sed '/"scripts": {/a \ \ \ \ "start":\ "bash run-start.sh",' >package.json
352 fi
` The if expression is missing the initial open bracket and in the insanity of bash expressions, the net result plays out somehow that (maybe) grep can't find anything and so 0 bytes are overwriting package.json.
Running your latest now ...
yeh, using a function in an expression is a pita
anyhow.. I also tested here on my pi0.. and looks good 2.10 to 2.11 (again) started right up
The install looks "better". Meaning the package.json is alive!
Install still tries to install electron. I don't know enough to figure out how to skip that one, or if it's got some dependencies that the MM server needs.
I've still got work to do like get a local browser running, though I can
curl "http://localhost:8080"
... and I get the html from the sample page. Thanks again!
@easyas314 install ALWAYS trys to install Electron.. it is marked optional, so if it fails, no problem, you'll see the error, can't stop it.. the base package DEPENDS on Electron. nothing else will do. I have overridden that.. because I think users should be able to run where they want to. Mich doesn't want the support headaches
mm needs to be on a graphical desktop system . (not cli)
my script should try to start chromium-browser if it finds armv6l and xwindows running
you should have seen this from npm start
Ready to go! Please point your browser to: http://0.0.0.0:8080
**Starting chromium browser now, have patience, it takes a minute**
[2020-04-05 21:31:33.552] [LOG] Create new calendar fetcher for url: http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics - Interval: 300000
[2020-04-05 21:31:35.171] [LOG] Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
if chromium-browser not installed, should get an error message "Chromium_browser not installed"
u would see this in the pm2 logs, if u start with pm2
pm2 logs --lines=100
@easyas314 have u had a chance to move forward?
I'm going to close this.. reopen if you still experience the failure..
Apologies for not replying sooner. This specific topic is resolved. I went chasing another squirrel involving a the midori browser. Thanks for the help and closing this!
Running a pi zero w on linux 4.19 "Buster" Rasbian. Ran raspberry script as instructed. (No previous MagicMirror directory.) MM fails to run because it can't parse the package.json file. Looked and it exists, but it has 0 bytes. Something in the script is resulting in 0 bytes redirected to it... Need testing or more details, let me know, the pi0 is slow, but willing to help as needed.