MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. devinhedge
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    D
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 8
    • Groups 0

    devinhedge

    @devinhedge

    1
    Reputation
    602
    Profile views
    8
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    devinhedge Unfollow Follow

    Best posts made by devinhedge

    • RE: Clean installation... fails left and right

      @shbatm said in Clean installation... fails left and right:

      @devinhedge said in Clean installation... fails left and right:

      for the last couple months Node.js and npm are currently BROKEN on RaspberryPi.

      What version of node are you using and how are you trying to install it?

      Current from default Rasbian repos.

      Node.Js works fine with Raspberry Pi, just don’t install it from the default repos.

      That may be the problem.

      Use these instructions:

      https://github.com/nodesource/distributions/blob/master/README.md

      I’ve installed both v8 and v10 successfully multiple times on new Pis in the last few months.

      I’ll give it a whirl. I was able to recreate the error 4 times so I just need to copy over the steps to recreate. I don’t have a lot of time to spend on it today.

      posted in Bug Hunt
      D
      devinhedge

    Latest posts made by devinhedge

    • RE: Clean installation... fails left and right

      Instructions for Installing MagicMirror on Rasbian Stretch Lite

      Install base Rasbian Stretch Lite image

      Update base installation

      sudo raspi-config

      1. Update pi password
      2. Update Timezone
      3. Update Keyboard
      4. Update hostname
      5. Update Localization (language)
      6. Update WiFi configuration
      7. Expand file system and reboot
      8. Enable ssh
      9. Update System

      sudo apt-get update && sudo apt upgrade -y && sudo apt-get dist-upgrade

      Install Xserver, LXDE-gui, lightdm and other nescessary things:

      sudo apt-get install raspberrypi-ui-mods firefox-esr build-essentials git -y

      Use raspi-config to autologin pi user to gui at boot

      raspi-config
      sudo reboot

      Use Raspi

      Install Node.js from source

      Remove Chris Lea’s Node.js if it has accidently been installed

      sudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-.list
      sudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-
      .list.save

      Add the NodeSource package signing key

      curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -

      Add the desired NodeSource repository

      VERSION=node_10.x
      DISTRO=“$(lsb_release -s -c)”
      echo “deb https://deb.nodesource.com/$VERSION $DISTRO main” | sudo tee /etc/apt/sources.list.d/nodesource.list
      echo “deb-src https://deb.nodesource.com/$VERSION $DISTRO main” | sudo tee -a /etc/apt/sources.list.d/nodesource.list

      Test if the installation is good.

      curl -sL https://deb.nodesource.com/test | bash -

      Received:

      (node:15418) TimeoutOverflowWarning: 4294967296000 does not fit into a 32-bit signed integer.
      Timer duration was truncated to 2147483647.
      SUCCESS
      (node:15418) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

      Install the Sample Node.js Electron app

      npm install --save-dev electron

      Git clone the sample app

      git clone https://github.com/electron/electron-quick-start.git

      Then install it and run

      cd ./electron-quick-start
      npm install
      npm start

      Received:

      0 info it worked if it ends with ok
      1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
      2 info using npm@6.4.1
      3 info using node@v10.15.0
      4 verbose run-script [ 'prestart', 'start', 'poststart' ]
      5 info lifecycle electron-quick-start@1.0.0~prestart: electron-quick-start@1.0.0
      6 info lifecycle electron-quick-start@1.0.0~start: electron-quick-start@1.0.0
      7 verbose lifecycle electron-quick-start@1.0.0~start: unsafe-perm in lifecycle true
      8 verbose lifecycle electron-quick-start@1.0.0~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/electron-quick-start/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
      9 verbose lifecycle electron-quick-start@1.0.0~start: CWD: /home/pi/electron-quick-start
      10 silly lifecycle electron-quick-start@1.0.0~start: Args: [ '-c', 'electron .' ]
      11 silly lifecycle electron-quick-start@1.0.0~start: Returned: code: 1  signal: null
      12 info lifecycle electron-quick-start@1.0.0~start: Failed to exec start script
      13 verbose stack Error: electron-quick-start@1.0.0 start: `electron .`
      13 verbose stack Exit status 1
      13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
      13 verbose stack     at EventEmitter.emit (events.js:182:13)
      13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
      13 verbose stack     at ChildProcess.emit (events.js:182:13)
      13 verbose stack     at maybeClose (internal/child_process.js:962:16)
      13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
      14 verbose pkgid electron-quick-start@1.0.0
      15 verbose cwd /home/pi/electron-quick-start
      16 verbose Linux 4.14.79-v7+
      17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
      18 verbose node v10.15.0
      19 verbose npm  v6.4.1
      20 error code ELIFECYCLE
      21 error errno 1
      22 error electron-quick-start@1.0.0 start: `electron .`
      22 error Exit status 1
      23 error Failed at the electron-quick-start@1.0.0 start script.
      23 error This is probably not a problem with npm. There is likely additional logging output above.
      24 verbose exit [ 1, true ]
      

      I’m beginning to think about the quote:

      Insanity: doing the same thing over and over again and expecting different results.

      posted in Bug Hunt
      D
      devinhedge
    • RE: Clean installation... fails left and right

      @shbatm said in Clean installation... fails left and right:

      @devinhedge said in Clean installation... fails left and right:

      for the last couple months Node.js and npm are currently BROKEN on RaspberryPi.

      What version of node are you using and how are you trying to install it?

      Current from default Rasbian repos.

      Node.Js works fine with Raspberry Pi, just don’t install it from the default repos.

      That may be the problem.

      Use these instructions:

      https://github.com/nodesource/distributions/blob/master/README.md

      I’ve installed both v8 and v10 successfully multiple times on new Pis in the last few months.

      I’ll give it a whirl. I was able to recreate the error 4 times so I just need to copy over the steps to recreate. I don’t have a lot of time to spend on it today.

      posted in Bug Hunt
      D
      devinhedge
    • RE: Clean installation... fails left and right

      @shbatm @dazza120 @MichMich @bhepler @Mykle1

      Okay… I think I’ve figured it out. It isn’t good news:

      I’ve brought this up on another thread, but I’ll mention here so that it is captured in context: for the last couple months Node.js and npm are currently BROKEN on RaspberryPi.

      I just tried a test this morning using the started Electron app at https://electronjs.org/docs/tutorial/first-app

      Running the automated install is a Red Herring. It is inappropriate to suggest it.

      We have to figure out how to fix the bugs in the Node.js installation for Raspberry Pi before anything else. I’m wondering if installing an older version of Node.js is the solution. If so, then what version would we start with?

      posted in Bug Hunt
      D
      devinhedge
    • RE: NPM install is giving Error.

      @nonamero I’ve brought this up on another thread, but I’ll mention here so that it is captured in context: for the last couple months Node.js and npm are currently BROKEN on RaspberryPi.

      I just tried a test this morning using the started Electron app at https://electronjs.org/docs/tutorial/first-app

      Running the automated install is a Red Herring. It is inappropriate to suggest it.

      We have to figure out how to fix the bugs in the Node.js installation for Raspberry Pi before anything else. I’m wondering if installing an older version of Node.js is the solution. If so, then what version would we start with?

      posted in Troubleshooting
      D
      devinhedge
    • RE: Clean installation... fails left and right

      Thanks for talking me off the ledge. I uninstalled electron. Then I deleted the electron folder. Then I ran npm install again. I received several warnings but the installation completed.

      Here is the result.

      pi@mirrorpi:~/MagicMirror $ npm start
      
      > magicmirror@2.5.0 start /home/pi/MagicMirror
      > sh run-start.sh
      
      /home/pi/MagicMirror/node_modules/electron/dist/electron: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.27' not found (required by /home/pi/MagicMirror/node_modules/electron/dist/electron)
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! magicmirror@2.5.0 start: `sh run-start.sh`
      npm ERR! Exit status 1
      npm ERR! 
      npm ERR! Failed at the magicmirror@2.5.0 start script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
      
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /home/pi/.npm/_logs/2019-01-01T02_28_54_363Z-debug.log
      
      

      [0_1546310061028_2019-01-01T02_28_54_363Z-debug.log](Uploading 100%)

      posted in Bug Hunt
      D
      devinhedge
    • Clean installation... fails left and right

      I don’t even know where to begin with this one.

      Not to be snarky… really… I’m concerned that MagicMirror isn’t being maintained. During installation there are a lot of deprecated node.js module warnings, and security warnings…

      audited 379 packages in 12.599s
      found 12 vulnerabilities (5 low, 5 moderate, 2 high)
      

      and when I finally resolve most of them, I get the following:

      pi@mirrorpi:~/MagicMirror $ npm start
      
      > magicmirror@2.5.0 start /home/pi/MagicMirror
      > sh run-start.sh
      
      /home/pi/MagicMirror/node_modules/electron/index.js:14
          throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')
          ^
      
      Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
          at getElectronPath (/home/pi/MagicMirror/node_modules/electron/index.js:14:11)
          at Object.<anonymous> (/home/pi/MagicMirror/node_modules/electron/index.js:18:18)
          at Module._compile (internal/modules/cjs/loader.js:689:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
          at Module.load (internal/modules/cjs/loader.js:599:32)
          at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
          at Function.Module._load (internal/modules/cjs/loader.js:530:3)
          at Module.require (internal/modules/cjs/loader.js:637:17)
          at require (internal/modules/cjs/helpers.js:22:18)
          at Object.<anonymous> (/home/pi/MagicMirror/node_modules/electron/cli.js:3:16)
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! magicmirror@2.5.0 start: `sh run-start.sh`
      npm ERR! Exit status 1
      npm ERR! 
      npm ERR! Failed at the magicmirror@2.5.0 start script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
      
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /home/pi/.npm/_logs/2018-12-31T22_44_48_657Z-debug.log
      

      So…

      1. Do I work to help fix this? I really don’t have time.
      2. Do I help someone fix this?
      3. Do I dump MagicMirror?
      4. Other?

      Mind you… I’m installing from scratch after the last set of updates caused the machine to have a stack overflow and randomly lock up. This is likely an Electron or node.js issue. Installing from scratch already has me upset.

      Config info:

      1. RasPi 3b+
      2. 8GB SD card
      3. Running on Rasbian Stretch Lite
      4. Attempting to run using sample config.js
      5. No other installed modules at this point
      6. Attempting to run as either server/client or server only
      posted in Bug Hunt
      D
      devinhedge
    • RE: Error on clean installation using npm install: electron-chromedriver@1.7.1

      @devinhedge did some digging. There is a bug in the install script.

      The install script looks for the following: https://github.com/electron/electron/releases/download/v1.7.0/chromedriver-v1.7.0-linux-arm64.zip

      There is no v1.7.0 of electron. There is a v1.7.1 of Electron.

      Electron v.1.7.0 was removed for some reason.

      posted in Troubleshooting
      D
      devinhedge
    • Error on clean installation using npm install: electron-chromedriver@1.7.1

      I’m doing a clean installation on an arm64 Alt-SBC running Debian Stretch (latest), Node v9.4.0, npm v5.6.0, and pm2 v2.9.3.

      I ran the following:

      npm install

      and received the following:

      >electron-chromedriver@1.7.1 install /home/******/MagicMirror/node_modules/spectron/node_modules/electron-chromedriver
      >node ./download-chromedriver.js

      /home/******/MagicMirror/node_modules/spectron/node_modules/electron-chromedriver/download-chromedriver.js:16
      if (error != null) throw error
      ^

      Error: Failed to find Electron v1.7.0 for linux-arm64 at https://github.com/electron/electron/releases/download/v1.7.0/chromedriver-v1.7.0-linux-arm64.zip
      at Request. (/home//MagicMirror/node_modules/nugget/index.js:169:61)
      at Request.emit (events.js:160:13)
      at Request.onRequestResponse (/home/
      /MagicMirror/node_modules/request/request.js:1068:10)
      at ClientRequest.emit (events.js:160:13)
      at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:548:21)
      at HTTPParser.parserOnHeadersComplete (_http_common.js:115:23)
      at TLSSocket.socketOnData (_http_client.js:439:20)
      at TLSSocket.emit (events.js:160:13)
      at addChunk (_stream_readable.js:269:12)
      at readableAddChunk (_stream_readable.js:256:11)
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! electron-chromedriver@1.7.1 install: node ./download-chromedriver.js
      npm ERR! Exit status 1
      npm ERR!
      npm ERR! Failed at the electron-chromedriver@1.7.1 install script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

      npm ERR! A complete log of this run can be found in:
      npm ERR! /home/******/.npm/_logs/2018-01-24T22_13_32_115Z-debug.log

      When I go look at the electron/chromedriver releases, there is no 1.7.1 candidate for arm64. Any ideas on how to make the installation more platform agnostic and updated to the latest stable electron?

      FWIW: the SBC is a Pine Rock64.

      I’m willing to put in the work if someone can coach me through some of the pi-specific decisions.

      posted in Troubleshooting
      D
      devinhedge