Read the statement by Michael Teeuw here.
Can't get MM to start, says it can't find electron, then electron won't start
-
@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" }
-
now change to MagicMirror folder and try the install for electron@3.0.10
-
@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 it also says that “local package.json exists, but node_modules is missing, did you mean to install?”
-
@jmartin1009 yes
npm install
and if you still have electron missing, then try to
npm install electron@3.0.10
-
@sdetweil do I do npm install in pi or magic mirror?
-
@jmartin1009 magigcmirror… u are installing the dependencies for that app
-
@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.
-
@jmartin1009 npm install from inside the magicmirror folder should have created node_modules (thats its (npm) job)
erase MagicMirror folder,
download again
and then cd MagicMirror and then npm install -
@sdetweil another error, it says
npm ERR! file /home/pi/MagicMirror/package.json npm ERR! code EJSONPARSE npm ERR! JSON.parse Failed to parse json npm ERR! JSON.parse Unexpected end of JSON input while parsing near ' ' npm ERR! JSON.parse Failed to parse package. json data. npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.