shopify theme check - Reached heap limit Allocation failed - JavaScript heap out of memory
Hello, I have the latest version of Shopify CLI My Node.js version is v20.17.0
I’m getting a fatal error when I try to run shopify theme check: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
PS D:\main theme\shopifyTheme New\shopifyTheme> shopify theme check
<--- Last few GCs --->
[5936:0000019D9AD81BF0] 208047 ms: Scavenge 4067.9 (4141.8) -> 4067.2 (4142.5) MB, 5.62 / 0.00 ms (average mu = 0.318, current mu = 0.142) allocation failure; [5936:0000019D9AD81BF0] 210740 ms: Mark-Compact 4068.9 (4143.8) -> 4068.6 (4148.5) MB, 2291.16 / 0.00 ms (average mu = 0.248, current mu = 0.167) allocation failure; GC in old space requested
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory ----- Native stack trace -----
PS D:\main theme\shopifyTheme New\shopifyTheme>
Please let me know how can I fixe it. Thanks
I just wanted to add a few more details here. The command was working fine earlier, and I had fixed some translation issues. Most of the issues were resolved, but now when I run the command again, it shows me this error.
this is my theme.check.yml file
extends:
- theme-check:recommended
ignore:
- node_modules/**
:wave: Can you provide the exact shopify cli version? and maybe more details about your theme? Using blocks? Big theme? Small theme? etc.
I have fixed it. The command doesn't work if there are many changes or missing values in the translation — it shows the above error. I manually matched the translations and fixed it.