cli icon indicating copy to clipboard operation
cli copied to clipboard

shopify theme check - Reached heap limit Allocation failed - JavaScript heap out of memory

Open AronWebSolutionPVTLTD opened this issue 9 months ago • 3 comments

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

AronWebSolutionPVTLTD avatar Apr 29 '25 11:04 AronWebSolutionPVTLTD

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/**

AronWebSolutionPVTLTD avatar Apr 30 '25 04:04 AronWebSolutionPVTLTD

:wave: Can you provide the exact shopify cli version? and maybe more details about your theme? Using blocks? Big theme? Small theme? etc.

charlespwd avatar May 01 '25 16:05 charlespwd

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.

AronWebSolutionPVTLTD avatar May 06 '25 07:05 AronWebSolutionPVTLTD