Instructions for Installing MagicMirror on Rasbian Stretch Lite
Install base Rasbian Stretch Lite image
Update base installation
sudo raspi-config
- Update pi password
- Update Timezone
- Update Keyboard
- Update hostname
- Update Localization (language)
- Update WiFi configuration
- Expand file system and reboot
- Enable ssh
- 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.