npm errors when trying to load magic mirror
Any advice on what to do with this error? I installed magic mirror by copying the code in the Complete Tutorial (Newbie Friendly). During that install, I saw an error on most of the lines that told me to run npm XXXX @npmlatest -g (I don’t remember what was in place of the XXXX) I ran that and rebooted. When I tried to run: DISPLAY=:0 npm start, I got another error which mentioned Electron. As such, I tried to run the code to download 1.7.6 as you can see below. Please advise.
pi@magicpi:~ $ sudo npm install -g firstname.lastname@example.org
/usr/bin/electron -> /usr/lib/node_modules/electron/cli.js
> email@example.com postinstall /usr/lib/node_modules/electron
> node install.js
Error: EACCES: permission denied, mkdir ‘/usr/lib/node_modules/electron/.electron’
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! firstname.lastname@example.org postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! Failed at the email@example.com postinstall 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! /root/.npm/_logs/2018-08-14T20_36_21_955Z-debug.log
pi@magicpi:~ $ cd ~/MagicMirror