Error : Maximum call stack stack exceeded when i run the command d2 app scripts init app in windows

Hello, i have been getting the error
RangeError: Maximum call stack size exceeded
at Object.existsSync (node:fs:301:20)
at findYarnLock (C:\Users\2.0\AppData\Roaming\npm\node_modules@dhis2\cli\node_modules@dhis2\cli-app-scripts\src\lib\paths.js:16:12)
in window when ever i run the command d2 app scripts init app

Hi @Yambanso_Kausiwa, welcome to the community!

Does this topic solve the problem for you?

Nope i already tried all the suggestions under that issue but to no avail

@Yambanso_Kausiwa did you by any chance manage to resolve this issue? I am facing the same challenge

Hi @iammash @Yambanso_Kausiwa

This issue has a pending solution, and there might be a workaround for you to solve this locally until that solution is rolled out.

Here’s a workaround:

The pending PR is here:


i resolved the issue by copying the yarn.lock file from a collegue. After that when i run the d2 app scripts init appName it worked


I am facing the same issue, could you please share the file atleast :slight_smile:

1 Like

Hi @Developer, did you update the app platform and CLI?

1 Like