Read the statement by Michael Teeuw here.
Can't install MMM-Jast on RPi Zero 2 W after OS upgrade to Bookworm
-
I had MMM_Jast working on a Pi Zero 2 W (Buster). I wanted to update Magic Mirror to the latest version but that required an OS update as well. So I did a fresh install of Bookworm and MagicMirror. The NodeJS version is 20.15.1. and the NPM version is 10.7.0.
Magic Mirror and a couple of modules are working fine. However, when I try to install MMM-Jast I get an error during the “npm install” part. Here is the error message:
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
Can I increase the heap space, and if so, how and to what value?
-
@wyovino yes, see this post on one of my script
some succeed with more, some w less
https://github.com/sdetweil/MagicMirror_scripts/issues/89#issuecomment-2174636859
-
@sdetweil I tried 400, 800, and 1024. 1024 bricked it. I was able to plug the USB into a Pi4 and get it working, While in the Pi4, I was able to install the MMM-Jast module and then reduce it back to 400. When I moved it back to the Zero 2W it worked. But the whole thing is agonizingly slow on the Zero 2 with Bookworm. About 10 times slower than with Buster. Even logging in via SSH was terribly slow.
That was a few days completely wasted. Just out of curiosity, is there a way to reset the memory allocation to whatever the default value is? I have faster Pi’s I could use but I don’t like the fan noise.
-
@wyovino the setting is for only one command.
in my opinion the pi02w should only run the 32 bit os due to its small memory size.
and you will have to increase swap space.
-
@sdetweil I did use the 32 bit version. From boot to MM display is around 5 minutes, maybe more. The stock ticker (MMM_Jast) is very slow and jerky compared to my mirror running on Buster, and basically unusable. There were other things I noticed too. After booting to Raspberry Pi O/S, the monitor goes completely white for a minute or two between the desktop display and the Magic Mirror. I never had that issue with Buster. If I’m forced to upgrade in the future I’ll use a Pi 4 or 5, but for now I’ll stick with what I have.
-
@wyovino I dont see that on my pi02w. only on my pi0…
pi02w behaves like my pi3.
-
@sdetweil Using Bookworm? Maybe my memory allotment fix messed things up, but I’m pretty sure it was like that before I did that. And it’s like that on two different Pi Zero 2’s, so it’s not a physical issue. I have a bunch of unused 4’s and 5’ but I’m reluctant to use them because I hear the drone of the fans when they’re in the mirror, which is in a small bathroom.