@sdetweil still says
electron: not found
Could this be because it says that node_modules is missing? I did both npm install and npm install electron@3.0.10 in MagicMirror.
@sdetweil still says
electron: not found
Could this be because it says that node_modules is missing? I did both npm install and npm install electron@3.0.10 in MagicMirror.
@sdetweil do I do npm install in pi or magic mirror?
@sdetweil it also says that “local package.json exists, but node_modules is missing, did you mean to install?”
@sdetweil the pi reboots and then I change to magicmirror folder and try to start magic mirror and it still says it can’t find electron for some reason :/
@sdetweil got this, now what?
pi@raspberrypi:~ $ npm init -y
Wrote to /home/pi/package.json:
{
"name": "pi",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
@sdetweil npm is 6.4.1 and node is 10.15.1. When I try to install electron now it just says that my cache input stream is empty. when I tried to get to node modules like @bhepler said, it said no such file or directory, and when I force cleared it gave me a warning message saying “I sure hope you know what you are doing.”
@bhepler I am given this error screen
pi@raspberrypi:~ $ sudo npm install -g electron@2.0.0
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ENODATA: Cache input stream was empty
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code EINTEGRITY
npm ERR! errno EINTEGRITY
npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/electron: Integrity verification failed for sha512-MAYuYPYfeCgTfXMl3ioXQAncWDyol9bCAkDBgeNSFemdEJgyOkTSixehWJJTIC9Pc7Ebrgljxn1t3lwm9ae/Bw== (/root/.npm/_cacache/content-v2/sha512/30/06/2e60f61f7828137d7325de2a174009dc583ca897d6c20240c181e35215e99d1098323a44d28b17a1589253202f4f73b11bae0963c67d6dde5c26f5a7bf07)
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-02-20T01_39_41_726Z-debug.log
@bhepler am I trying to install the correct version of electron or is there another version I should be using, the guide I was trying said to use 1.7.6 but people on here say 2.0.0
@bhelper am I trying to install the correct version of electron is there another version I should be using, the guide I was trying said to use 1.7.6 but people on here say 2.0.0
When I try to install electron using sudo npm install electron@2.0.0, I get
pi@raspberrypi:~ $ sudo npm install electron@2.0.0
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ENODATA: Cache input stream was empty
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code EINTEGRITY
npm ERR! errno EINTEGRITY
npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/electron: Integrity verification failed for sha512-MAYuYPYfeCgTfXMl3ioXQAncWDyol9bCAkDBgeNSFemdEJgyOkTSixehWJJTIC9Pc7Ebrgljxn1t3lwm9ae/Bw== (/root/.npm/_cacache/content-v2/sha512/30/06/2e60f61f7828137d7325de2a174009dc583ca897d6c20240c181e35215e99d1098323a44d28b17a1589253202f4f73b11bae0963c67d6dde5c26f5a7bf07)
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-02-20T00_15_03_383Z-debug.log
and when I try to start magic mirror I get
pi@raspberrypi:~ $ cd ~/MagicMirror
pi@raspberrypi:~/MagicMirror $ DISPLAY=:0 npm start
> magicmirror@2.6.0 start /home/pi/MagicMirror
> sh run-start.sh
run-start.sh: 4: run-start.sh: electron: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! magicmirror@2.6.0 start: `sh run-start.sh`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the magicmirror@2.6.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2019-02-20T00_18_40_335Z-debug.log
I’m a complete noobie when it comes to this and I just can’t seem to get it to work, all help is appreciated!!