Read the statement by Michael Teeuw here.
can't run "npm run start"
-
@jefftse i had an error yesterday on a clean installation of raspberrian with npm and electron was involved, but I did it from another virtual desktop, (working with unencrypted VNC server) working on finding a solution.
-
@jefftse what os platform is this?
did you do manual install or use the script?
-
@actimbar did u use the install script?
-
@sdetweil by VNC desktop, I got stuck on step 4 of manual installation (npm install), I made a reboot before the error, now I’m trying (npm install) without VNC.
Now installation ended successfully! -
Raspberry pi 4 raspbrian
-
I did and the same thing
-
@jefftse are u doing this over vnc without a real display?
the start script assumes a real display
change the package.json start to match your config"start": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js",
the start command is
npm start
-
I tried both. I even deleted the whole folder and reinstalled. Maybe electron is the problem.
-
@jefftse no, change the line in package.json
from"start": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js",
to
"start": "./node_modules/.bin/electron js/electron.js",
the error is " cannot open display: :0.0" typically, DISPLAY:0 is the physical display
-
just did that and the error is below
magicmirror@2.11.0 start /home/jeff/MagicMirror
electron js/electron.jsNo protocol specified
(electron:32527): Gtk-WARNING **: 21:53:58.634: cannot open display: :0.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! magicmirror@2.11.0 start:electron js/electron.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the magicmirror@2.11.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/jeff/.npm/_logs/2020-06-24T01_53_58_663Z-debug.log