Read the statement by Michael Teeuw here.
electron-rebuild problems with MagicMirror 2.22.0
-
You are right. I think
optionalDependencies
would be a great solution. Module developers could then add a hint to runnpm ci
in the MagicMirror directory to their installations instructions.As the container it self is untouched it should be no problem. It only causes @electron/rebuild to be installed the next time the script is called.
-
@KristjanESPERANTO but if u look at electron/rebuild after install u call electron-rebuild
still has to be installed in the base node_modules folder…
older unmaintained modules are broken either way. why I had to fork MMM-Buttons.
-
@wishmaster270 optional is there so that IF electron is NOT installed, the install does not fail (needed on pi0w at least)
have nothing to do w cimy script ONLY installs prod, no dev. as 99.5% of users are users not mm developers. has nothing to do w module developers
-
@karsten13 and the postinstall checks for it being there, and if so skips the e-r install.
doesn’t know/care HOW it got installed before
-
you can use
--omit=optional
as param fornpm install
, I use this for myamd64
images because they are run to 99,9% withnpm run server
so electron is not needed -
@karsten13 What are your thoughts on adding
npm install @electron/rebuild --unsafe-perm; \
as part of the container image creation process to https://gitlab.com/khassel/magicmirror/-/blob/master/build/Dockerfile-debian? -
I’m trying to keep image size small … but which image are you using?
latest
orfat
?