Create React App : Range error - Maximum call stack size exceeded

2.3k Views Asked by At

I get this error when trying to create a new react app. Tried updating create-react-app using npm and reinstalling React.

C:\Users\Panduka\Documents\tests>create-react-app markdown
path.js:33
function normalizeStringWin32(path, allowAboveRoot) {
                             ^

RangeError: Maximum call stack size exceeded
    at normalizeStringWin32 (path.js:33:30)
    at Object.resolve (path.js:338:20)
    at getRootPath (C:\Users\Panduka\AppData\Roaming\npm\node_modules\create-react-app\node_modules\fs-extra\lib\mkdirs\win32.js:6:27)
    at invalidWin32Path (C:\Users\Panduka\AppData\Roaming\npm\node_modules\create-react-app\node_modules\fs-extra\lib\mkdirs\win32.js:16:12)
    at mkdirsSync (C:\Users\Panduka\AppData\Roaming\npm\node_modules\create-react-app\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:15:39)
    at mkdirsSync (C:\Users\Panduka\AppData\Roaming\npm\node_modules\create-react-app\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:35:16)
    at mkdirsSync (C:\Users\Panduka\AppData\Roaming\npm\node_modules\create-react-app\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:36:9)
    at mkdirsSync (C:\Users\Panduka\AppData\Roaming\npm\node_modules\create-react-app\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:36:9)
    at mkdirsSync (C:\Users\Panduka\AppData\Roaming\npm\node_modules\create-react-app\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:36:9)
    at mkdirsSync (C:\Users\Panduka\AppData\Roaming\npm\node_modules\create-react-app\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:36:9)
4

There are 4 best solutions below

0
On BEST ANSWER

Fixed this issue by disabling Windows Defender - Controlled Folder Access.

0
On

Disabling Controlled Folder access helped

Disabling Controlled Folder access helped

1
On

Fixed this issue by using Windows Subsystem Linux. BTW, my Windows Defender is controlled by my organization policies.

0
On

I faced a similar issue today and fixed with running: $ npm logout

Error Log:

4268 http fetch GET 404 https://registry.npmjs.org/@xtuc%2flong 549ms
4269 silly fetchPackageMetaData error for @xtuc/[email protected] 404 Not Found: @xtuc/[email protected]
4270 verbose stack RangeError: Maximum call stack size exceeded
4270 verbose stack     at failedDependency (C:\Program Files\nodejs\node_modules\npm\lib\install\deps.js:378:27)
4270 verbose stack     at failedDependency (C:\Program Files\nodejs\node_modules\npm\lib\install\deps.js:396:9)
4270 verbose stack     at failedDependency (C:\Program Files\nodejs\node_modules\npm\lib\install\deps.js:396:9)
4270 verbose stack     at failedDependency (C:\Program Files\nodejs\node_modules\npm\lib\install\deps.js:396:9)```