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

**URL:** <https://community.dhis2.org/t/error-maximum-call-stack-stack-exceeded-when-i-run-the-command-d2-app-scripts-init-app-in-windows/53906>\
**Category:** App Development\
**Created:** [10 July 2023 12:55 UTC](https://community.dhis2.org/t/error-maximum-call-stack-stack-exceeded-when-i-run-the-command-d2-app-scripts-init-app-in-windows/53906 "2023-07-10T12:55:23Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Rene](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/rene/32/36035_2.png) [@Rene](https://community.dhis2.org/u/Rene)\
**Post date:** [12 July 2023 12:28 UTC](https://community.dhis2.org/t/error-maximum-call-stack-stack-exceeded-when-i-run-the-command-d2-app-scripts-init-app-in-windows/53906/5 "2023-07-12T12:28:53Z")

</div>

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:

> [@RangeError: Maximum call stack size exceeded Error when I run d2 app scripts init my-app](https://community.dhis2.org/t/rangeerror-maximum-call-stack-size-exceeded-error-when-i-run-d2-app-scripts-init-my-app/49023/3):
>
> Hello @Gassim Thanks for the support steps. However the above steps didn’t work. I had to delete the findYarnLock function in the path.js file under C:\Users\MY PC\AppData\Local\Yarn\Data\global\node\_modules@dhis2\cli-app-scripts\node\_modules. After deleting that function I was able to create my react app successfully.

The pending PR is here:

> <https://github.com/dhis2/app-platform/pull/811>
>
> \> I was facing this error when I run the d2 app scripts init pmtct to create a n…ew app. Then I found this solution in the CoP: https://community.dhis2.org/t/rangeerror-maximum-call-stack-size-exceeded-error-when-i-run-d2-app-scripts-init-my-app/49023
> 
> \> But\` there we needa delete findYarnLock function. Earlier today, when a was checking this function, I noticed that this function is in an infinite loop on windows systems because the base case inside this function is not verified only in windows.
> 
> !\[dhis2 error\](https://github.com/dhis2/app-platform/assets/64174170/2005da07-f635-49c7-bee8-c9fd94bbb38b)
> 
> \`The line if(base==="/") I think we are checking only for mac or linux OS 'cause in windows, is if(base==="C:\\\\") .\`
> !\[Capture123\](https://github.com/dhis2/app-platform/assets/64174170/ac2ed6e2-b145-4b3f-905e-49f423871656)
> 
> \---
> \## I tried this solution and it worked for me.
> 
> !\[Capturesdsd\](https://github.com/dhis2/app-platform/assets/64174170/8e3748e1-7073-4427-97f5-35ccf9dfb926)

---

_[View the full topic](https://community.dhis2.org/t/error-maximum-call-stack-stack-exceeded-when-i-run-the-command-d2-app-scripts-init-app-in-windows/53906)._
