Read the statement by Michael Teeuw here.
electron-rebuild problems with MagicMirror 2.22.0
-
@sdetweil
New installation, new luck!
Everything works well now and i think if found the reason for the problems.As i wrote earlier i am running TeleFrame on the same Pi with MagicMirror. This time i installed TeleFrame manually instead of with the installer as i saw that the automatic installer of Teleframe installs a global version of Electron and adds architecture settings to the “.profile” file of the user.
-
@wishmaster270 cool. thx for feedback
don’t know Teleframe.
-
The problems on my machine are obviously of a different nature. I’ll investigate that later.
For the original issue it should be worth using
@electron/rebuild
instead ofmagicmirror-rebuild
orelectron-rebuild
. I tested it in a virtual machine and it works great. Here is my solution which is less invasive:
https://github.com/Tom-Hirschberger/MMM-GPIO-Notifications/pull/7What do you think?
-
@KristjanESPERANTO my postinstall script uses electron-rebuild
his development branch
-
Yes, but @electron/rebuild is the successor of electron-rebuild. And the “trick” in the postinstall script seems not necessary at all.
-
Hi and thank you for contributing. I confirm that changing to magicmirror-rebuild did not make things batter but worse. I now followed the suggestion of @sdetweil and implemented his postinstall script. Things are working perfectly now and should work in future releases, too.
I merged the new changes to the master a few minutes ago and released version 0.0.7 of MMM-GPIO-Notifications. I will implement this approach in my other modules, too.
-
@wishmaster270 OK, you’re welcome.
Since the thread is also for other developers: I recommend considering my approach, as I consider the other approach (installing to a higher-level directory) to be more error-prone. But it’s a creative workaround. -
@KristjanESPERANTO
The problem with installing it in the module directory is that we need to compile the library against the electron version installed in the MagicMirror project.
If electron-rebuild is installed in the module directory it might fail to detect the right electron version (which was the cause of the rebuild problems in the past).
So the right way is to install electron-rebuild in the same project as electron and call it from there.It might be worth to think about adding it as a dependency in the main project.
-
@wishmaster270 Okay, thanks for the explanation! I haven’t been able to read that anywhere in such clear words and I haven’t dealt with the past problems. Then I withdraw my recommendation because I lack the overview.
-
@KristjanESPERANTO ah I see
haven’t heard of @electron/rebuild