Closed ihadx closed 3 years ago
I tried to upgrade MMM-BackgroundSlideshow on two magic mirrors I am using, both are running rpi 4 and on both am getting error regarding incorrect binaries.
I tried suggested fix in error log but it did not help. Please remove the 'node_modules/sharp' directory and run 'npm install' on the 'linux-armv7' platform.
[17.05.2021 21:09.52.648] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error: 'linux-armv6' binaries cannot be used on the 'linux-armv7' platform. Please remove the 'node_modules/sharp' directory and run 'npm install' on the 'linux-armv7' platform.
[17.05.2021 21:09.52.658] [ERROR] App threw an error during load
[17.05.2021 21:09.52.659] [ERROR] Error: 'linux-armv6' binaries cannot be used on the 'linux-armv7' platform. Please remove the 'node_modules/sharp' directory and run 'npm install' on the 'linux-armv7' platform.
at Object.hasVendoredLibvips (/home/pi/MagicMirror/modules/MMM-BackgroundSlideshow/node_modules/sharp/lib/libvips.js:82:13)
at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-BackgroundSlideshow/node_modules/sharp/lib/constructor.js:7:22)
at Module._compile (internal/modules/cjs/loader.js:1152:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:10)
at Module.load (internal/modules/cjs/loader.js:992:32)
at Module._load (internal/modules/cjs/loader.js:885:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12633)
at Module.require (internal/modules/cjs/loader.js:1032:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-BackgroundSlideshow/node_modules/sharp/lib/index.js:3:15)
[17.05.2021 21:09.52.661] [ERROR] Whoops! There was an uncaught exception...
[17.05.2021 21:09.52.665] [ERROR] Error: 'linux-armv6' binaries cannot be used on the 'linux-armv7' platform. Please remove the 'node_modules/sharp' directory and run 'npm install' on the 'linux-armv7' platform.
at Object.hasVendoredLibvips (/home/pi/MagicMirror/modules/MMM-BackgroundSlideshow/node_modules/sharp/lib/libvips.js:82:13)
at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-BackgroundSlideshow/node_modules/sharp/lib/constructor.js:7:22)
at Module._compile (internal/modules/cjs/loader.js:1152:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:10)
at Module.load (internal/modules/cjs/loader.js:992:32)
at Module._load (internal/modules/cjs/loader.js:885:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12633)
at Module.require (internal/modules/cjs/loader.js:1032:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-BackgroundSlideshow/node_modules/sharp/lib/index.js:3:15)
[17.05.2021 21:09.52.665] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
[17.05.2021 21:09.52.666] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
I too updated 2 MagicMirrors to this latest update, and it black-screened both of them. When I commented-out MMM-BackgroundSlideshow from config.js, normal functioning returned. I then followed the direction above to "git checkout 8865158" and then could leave the BackgroundSlideshow section in my config.js, but its not working; no images are being displayed. How can I revert to a prior version that was working as a short-term fix?
@ihadx, can you look and see what errors are coming up?
@erikvoznak, it looks like it is trying to use the wrong binaries. I just did a fresh install on a rpi 4, when I ran the 'npm install' in the MMM-BackgroundSlideshow directory, it ended up downloading the source and building the binaries. Did you do the suggested fix in the MMM-BackgroundSlideshow directory or in the main Magic Mirror directory? Maybe try both.
@SCHokie, can you post what errors you are seeing in the logs?
Be sure you are running 'npm install' in the MagicMirror/modules/MMM-BackgroundSlideshow directory and the MagicMirror/vendor directory.
Yea, when the upgrade first broke, I attempted a clean module re-install, and believe i failed to do the 'npm install'. With that done, now on both MM's', the downgrade detailed above has them working again. Thanks.
The error is "Cannot find module 'sharp'" which is not a module I've installed. I simplifed my config.js to be just clock and MMM-BackgroundSlideshow, made sure it still worked, then did a 'git checkout master' in the MMM-BackgroundSlideshow folder and restarted mm. The resulting log file with errors is here: mm log on latest MMM-BackgroundSlideshow.txt
Sharp is a library used for resizing images on the fly. Be sure to do 'npm install' in the MMM-BackgroundSlideshow folder as well as the MagicMirror/vendor folder to make sure all dependencies are installed.
Ok great that was it. Thanks! I got it working with this: cd modules/MMM-BackgroundSlideshow git checkout master npm install pm2 restart mm
I reverted using the following commands and then my magicmirror works again: cd modules/MMM-BackgroundSlideshow git checkout 8865158 pm2 restart mm