Read the statement by Michael Teeuw here.
After update MMM-Buttons breaks, made things worse trying to fix it
-
@gonzonia
Clean reinstalling is always a solid option definitely.
Your issue might have been node version was mismatched.
Ref this; https://nodejs.org/en/download/releases
Before update your node with nvm, you might need(sudo) apt update & upgrade. -
@MMRIZE my upgrade script upgrades node/npm
the ekectron-rebuild cannot run from the module folder anymore…
-
@MMRIZE I did an apt-update and upgrade . Actually the node version went too far. It was suddenly version 20+ I just reset it to 16.20.1 (which is what’s showing up as I do the clean install on the other machine). That seems to get me back to where I might be able to recover from this mess.
@sdetweil I used your upgrade script but I’m not sure what happened. I’m now at least back to this
pi@MagicMirror:~/MagicMirror/modules/MMM-Buttons $ npm install > Magic-Mirror-Module-Buttons@1.0.0 postinstall > node_modules/.bin/electron-rebuild -e ../../node_modules/electron ⠋ Searching dependency tree An unhandled error occurred inside electron-rebuild Could not detect abi for version 25.2.0 and runtime electron. Updating "node-abi" might help solve this issue if it is a new release of electron Error: Could not detect abi for version 25.2.0 and runtime electron. Updating "node-abi" might help solve this issue if it is a new release of electron at Object.getAbi (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/node_modules/node-abi/index.js:36:9) at new Rebuilder (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/lib/src/rebuild.js:126:48) at rebuildWithOptions (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/lib/src/rebuild.js:404:23) at Object.doRebuild [as rebuild] (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/lib/src/rebuild.js:427:16) at /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/lib/src/cli.js:124:33 at Generator.next (<anonymous>) at fulfilled (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/lib/src/cli.js:6:58) npm ERR! code 255 npm ERR! path /home/pi/MagicMirror/modules/MMM-Buttons npm ERR! command failed npm ERR! command sh -c -- node_modules/.bin/electron-rebuild -e ../../node_modules/electron npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2023-07-03T13_56_15_900Z-debug-0.logAny ideas
-
@gonzonia said in After update MMM-Buttons breaks, made things worse trying to fix it:
@sdetweil I used your upgrade script but I’m not sure what happened. I’m now at least back to this
yes, MMM-Buttons is busted on upgrade… use my fork
-
@sdetweil Apologies. You did say that already and it didn’t penetrate. Replaced with your fork and it looks like I’m mostly back up. CalendarExt2 doesn’t seem to be loading though. I’ll have to dig into that later.
-
@gonzonia had same problems and tried several methods. i’m not a linux crack and can only make what other say to try. :see-no-evil_monkey: :grinning_squinting_face:
this Post help me:
https://forum.magicmirror.builders/topic/16074/electron-rebuild-and-magicmirror-v2-18-and-more/2?page=1-
delete any existing
../modules/MMM-Buttonsfolder. -
clone the repository in your
modulesfolder:
cd ~/MagicMirror/modules
git clone https://github.com/MarcLandis/MMM-Buttons.git
cd MMM-Buttons -
install
magicmirror-rebuildlibrary with this command:
npm i magicmirror-rebuild
pi@MM:~/MagicMirror/modules/MMM-Buttons $ npm i magicmirror-rebuild added 191 packages, and audited 192 packages in 43s 37 packages are looking for funding run `npm fund` for details found 0 vulnerabilities- try to execute
MagicMirror-rebuildscript for rebuild with this command:
./node_modules/.bin/MagicMirror-rebuild
pi@MM:~/MagicMirror/modules/MMM-Buttons $ ./node_modules/.bin/MagicMirror-rebuild ⠹ MagicMirror Building module: epoll, Completed: 0gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3" ⠸ MagicMirror Building module: epoll, Completed: 0gyp http GET https://www.electronjs.org/headers/v25.2.0/node-v25.2.0-headers.tar.gz ⠏ MagicMirror Building module: epoll, Completed: 0gyp http 200 https://artifacts.electronjs.org/headers/v25.2.0/node-v25.2.0-headers.tar.gz?force_headers_dist=1 ⠼ MagicMirror Building module: epoll, Completed: 0gyp http GET https://www.electronjs.org/headers/v25.2.0/SHASUMS256.txt ⠋ MagicMirror Building module: epoll, Completed: 0gyp http 200 https://artifacts.electronjs.org/headers/v25.2.0/SHASUMS256.txt?force_headers_dist=1 ⠙ MagicMirror Building module: epoll, Completed: 0gyp info spawn /usr/bin/python3 gyp info spawn args [ gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/25.2.0/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/25.2.0', gyp info spawn args '-Dnode_gyp_dir=/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/25.2.0/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] ⠹ MagicMirror Building module: epoll, Completed: 0gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] make: Verzeichnis „/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build“ wird betreten CXX(target) Release/obj.target/epoll/src/epoll.o ⠹ MagicMirror Building module: epoll, Completed: 0 SOLINK_MODULE(target) Release/obj.target/epoll.node ⠧ MagicMirror Building module: epoll, Completed: 0 COPY Release/epoll.node make: Verzeichnis „/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build“ wird verlassen ✔ MagicMirror Rebuild CompleteThat you see
MagicMirror Rebuild Complete!
Your module is now installed correctlyThis way will also be good for the Originl
MMM-Buttons from the Year 2017and many othermodules!if you work with this module
https://github.com/Jopyth/MMM-Buttonsyou must change 2 lines and add 1 line in the filepackage.jsonaftergit clone:a.) change Line 23 from
"postinstall": "node_modules/.bin/electron-rebuild -e ../../node_modules/electron"to
"postinstall": "node_modules/.bin/magicmirror-rebuild -e ../../node_modules/electron"b.) change Line 29 from
"electron-rebuild": "^1.2.1"to
"magicmirror-rebuild": "^1.0.0"c.) add a line after line26 from
"onoff": "latest"to"onoff": "latest", "magicmirror-rebuild": "latest"after that you can continue with step 3, good luck :)
-
-
@Lusbueb or, you can get my fork of MMM-Buttons which fixes the install problem
-
@sdetweil Of course I had also tried your git repo but it didn’t work for me, so I kept looking and with the alternative migicmirror-rebuild every module worked.
I’ve also seen that some modules have been adapted tomagicmirror-rebuild, but it’s of no use if you don’t know exactly how to use it.
my description above was the solution that worked for me, so I published it here.
thank you again for your support. :hugging_face: -
@Lusbueb I’d like to know what didn’t work, as I test it quite often. I don’t like providing fixes that don’t work…
-
@sdetweil if i run your
git repoit looks liike this:pi@MM:~ $ cd ~/MagicMirror/modules pi@MM:~/MagicMirror/modules $ git clone https://github.com/Jopyth/MMM-Buttons.git Klone nach 'MMM-Buttons' ... remote: Enumerating objects: 54, done. remote: Total 54 (delta 0), reused 0 (delta 0), pack-reused 54 Empfange Objekte: 100% (54/54), 11.34 KiB | 893.00 KiB/s, fertig. Löse Unterschiede auf: 100% (25/25), fertig. pi@MM:~/MagicMirror/modules $ cd MMM-Buttons pi@MM:~/MagicMirror/modules/MMM-Buttons $ npm install npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated electron-rebuild@1.11.0: Please use @electron/rebuild moving forward. There is no API change, just a package name change npm ERR! code 7 npm ERR! path /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll npm ERR! command failed npm ERR! command sh -c node-gyp rebuild npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@6.1.0 npm ERR! gyp info using node@20.4.0 | linux | arm npm ERR! gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3" npm ERR! gyp ERR! UNCAUGHT EXCEPTION npm ERR! gyp ERR! stack TypeError: Cannot assign to read only property 'cflags' of object '#<Object>' npm ERR! gyp ERR! stack at createConfigFile (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/node-gyp/lib/configure.js:118:21) npm ERR! gyp ERR! stack at /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/node-gyp/lib/configure.js:85:9 npm ERR! gyp ERR! stack at /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/mkdirp/index.js:30:20 npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:189:23) npm ERR! gyp ERR! System Linux 5.10.103-v7+ npm ERR! gyp ERR! command "/usr/bin/node" "/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/.bin/node-gyp" "rebuild" npm ERR! gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll npm ERR! gyp ERR! node -v v20.4.0 npm ERR! gyp ERR! node-gyp -v v6.1.0 npm ERR! gyp ERR! This is a bug in `node-gyp`. npm ERR! gyp ERR! Try to update node-gyp and file an Issue if it does not help: npm ERR! gyp ERR! <https://github.com/nodejs/node-gyp/issues> npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2023-07-09T13_31_31_133Z-debug-0.log pi@MM:~/MagicMirror/modules/MMM-Buttons $then i changed in our
package.json"postinstall": "node_modules/.bin/magicmirror-rebuild -e ../../node_modules/electron" }, "dependencies": { "onoff": "latest", "magicmirror-rebuild": "latest" }, "devDependencies": { "magicmirror-rebuild": "^1.0.0" }and do
npm installit looks like this:pi@MM:~/MagicMirror/modules/MMM-Buttons $ npm install > Magic-Mirror-Module-Buttons@1.0.0 postinstall > node_modules/.bin/magicmirror-rebuild -e ../../node_modules/electron sh: 1: node_modules/.bin/magicmirror-rebuild: not found npm ERR! code 127 npm ERR! path /home/pi/MagicMirror/modules/MMM-Buttons npm ERR! command failed npm ERR! command sh -c node_modules/.bin/magicmirror-rebuild -e ../../node_modules/electron npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2023-07-09T13_37_41_609Z-debug-0.log pi@MM:~/MagicMirror/modules/MMM-Buttons $so, the
package.jsonis allready changed, i delete the new created filepackage-lock.jsonand foldernode_modulesand runnpm i magicmirror-rebuildit look like this:pi@MM:~/MagicMirror/modules/MMM-Buttons $ npm i magicmirror-rebuild npm WARN idealTree Removing dependencies.magicmirror-rebuild in favor of devDependencies.magicmirror-rebuild added 191 packages, and audited 192 packages in 39s 37 packages are looking for funding run `npm fund` for details found 0 vulnerabilitiesand then in run
./node_modules/.bin/MagicMirror-rebuild, it looks like this an everything ist ok an running with no errors:pi@MM:~/MagicMirror/modules/MMM-Buttons $ ./node_modules/.bin/MagicMirror-rebuild ⠋ MagicMirror Building module: epoll, Completed: 0gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3" ⠙ MagicMirror Building module: epoll, Completed: 0gyp http GET https://www.electronjs.org/headers/v25.2.0/node-v25.2.0-headers.tar.gz ⠦ MagicMirror Building module: epoll, Completed: 0gyp http 200 https://artifacts.electronjs.org/headers/v25.2.0/node-v25.2.0-headers.tar.gz?force_headers_dist=1 ⠙ MagicMirror Building module: epoll, Completed: 0gyp http GET https://www.electronjs.org/headers/v25.2.0/SHASUMS256.txt ⠹ MagicMirror Building module: epoll, Completed: 0gyp http 200 https://artifacts.electronjs.org/headers/v25.2.0/SHASUMS256.txt?force_headers_dist=1 gyp info spawn /usr/bin/python3 gyp info spawn args [ gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/25.2.0/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/25.2.0', gyp info spawn args '-Dnode_gyp_dir=/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/25.2.0/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] ⠸ MagicMirror Building module: epoll, Completed: 0gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] make: Verzeichnis „/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build“ wird betreten CXX(target) Release/obj.target/epoll/src/epoll.o ⠹ MagicMirror Building module: epoll, Completed: 0 SOLINK_MODULE(target) Release/obj.target/epoll.node ⠇ MagicMirror Building module: epoll, Completed: 0 COPY Release/epoll.node make: Verzeichnis „/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build“ wird verlassen ✔ MagicMirror Rebuild Completehope it helps you :-)
Regards, Peter from Switzerland -
@Lusbueb said in After update MMM-Buttons breaks, made things worse trying to fix it:
that is not mine… that is the broken one
substitute my repo URL for the documented git clone url
-
@sdetweil said in After update MMM-Buttons breaks, made things worse trying to fix it:
@Lusbueb said in After update MMM-Buttons breaks, made things worse trying to fix it:
that is not mine… that is the broken one
substitute my repo URL for the documented git clone url
oh yes, thats true! 🙈 Please change your Installation -Instruktion in your GIT, thank you😅
-
@Lusbueb said in After update MMM-Buttons breaks, made things worse trying to fix it:
Please change your Installation -Instruktion in your GIT
no… mine is a fork of the master… you should know to substitute my URL for the one in the doc (if any)
if I were to change the link AND submit it to the author, AND they took it, then their doc would point to MY repo incorrectly…
this is how the fork process works…
SO, if you git clone my url and do the npm install, does it fail?
-
@sdetweil said in After update MMM-Buttons breaks, made things worse trying to fix it:
@Lusbueb said in After update MMM-Buttons breaks, made things worse trying to fix it:
Please change your Installation -Instruktion in your GIT
no… mine is a fork of the master… you should know to substitute my URL for the one in the doc (if any)
if I were to change the link AND submit it to the author, AND they took it, then their doc would point to MY repo incorrectly…
this is how the fork process works…
SO, if you git clone my url and do the npm install, does it fail?
yes you did it :-)
your fork works, you are my hero! :-)
but why can’t you adapt the readme file in a FORK?
pi@MM:~/MagicMirror/modules $ git clone https://github.com/sdetweil/MMM-Buttons Klone nach 'MMM-Buttons' ... remote: Enumerating objects: 56, done. remote: Counting objects: 100% (4/4), done. remote: Compressing objects: 100% (4/4), done. remote: Total 56 (delta 0), reused 2 (delta 0), pack-reused 52 Empfange Objekte: 100% (56/56), 11.86 KiB | 146.00 KiB/s, fertig. Löse Unterschiede auf: 100% (25/25), fertig. pi@MM:~/MagicMirror/modules $ cd MMM-Buttons pi@MM:~/MagicMirror/modules/MMM-Buttons $ npm install > Magic-Mirror-Module-Buttons@1.0.0 postinstall > ./postinstall ✔ Rebuild Complete added 6 packages, and audited 7 packages in 32s found 0 vulnerabilities -
@Lusbueb cause it’s temporary… maybe.
things you just learn to deal w
-
@sdetweil said in After update MMM-Buttons breaks, made things worse trying to fix it:
@Lusbueb or, you can get my fork of MMM-Buttons which fixes the install problem
hello sam
Can you please adjust the command in your repo (https://github.com/sdetweil/MMM-Buttons) under Installation:from (false):
git clone https://github.com/Jopyth/MMM-Buttons.gitto (right):
git clone https://github.com/sdetweil/MMM-ButtonsI’m so glad that I copied the link to this forum back then, but it took a long time before I realized that I was always installing the faulty git (Jopyth) instead of your git, just because I followed your installation instructions.
Happy New Year and thank you for your work :-)
Kind regards
Peter -
@Lusbueb done… I never copy/paste that instruction… I push the green button to copy the code in this current repo (regardless of the name)
-
@Lusbueb Just a side note: On the module list is the fork from MarcLandis (https://github.com/MarcLandis/MMM-Buttons), he is actively maintaining the module.
-
@KristjanESPERANTO Thank you for the tip, but the notification does not work for the MMM-Carousel module and with the fork from sdetweil everything works as it should for me.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login