Create-react-app: npx create-react-app my-app --- > npm ERR! Maximum call stack size exceeded

Created on 6 Oct 2018  路  10Comments  路  Source: facebook/create-react-app

Is this a bug report?

YES

Did you try recovering your dependencies?

npm --version --> 6.4.1

Which terms did you search for in User Guide?

I'm trying to create new React application with npx create-react-app, but I get the following error:

npm ERR! Maximum call stack size exceeded

Environment

System:
OS: macOS 10.14
CPU: x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Binaries:
Node: 8.12.0 - /usr/local/bin/node
npm: 6.4.1 - /usr/local/bin/npm
Browsers:
Chrome: 69.0.3497.100
Firefox: 58.0.2
Safari: 12.0
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: 2.0.3

Steps to Reproduce

(Write your steps here:)

  1. I'm trying to create new React application with npx create-react-app, but I get the following error:
  2. Uninstall node, npm, create-react-app and back install and dit it not work
  3. Uninstall node, npm and create-react-app, reinstall them and follow the same error when you run "npx create-react-app my-app"

Expected Behavior

I thought that when executing "npx create-react-app my-app" my my-app project would be created as always.

Actual Behavior

1- I'm trying to create new React application with npx create-react-app, but I get the following error:
screen shot 2018-10-05 at 11 38 13 pm

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Most helpful comment

After a long days without luck, finally found a great solution and able to run the command npx create-react app awesome-app, npm init react-app awesome-app and create-react-app awesome-app with npm or yarn as well

The culprit was .npmrc file that was located on your user home dir Users/you/.npmrc. once you remove the files, or remove the contents you should be able to init the CRA2 now.

Happy hacking!

All 10 comments

seems the error was from npm, I had seen it some while ago.

I am facing the same issue after cra2 was announced, and cannot seems a good way to fix it.
Trying with npx, npm init, and yarn create, no success.
Have reinstall node 8.x and 10.x
Downgrading and upgrading npm 4.6.x, 5.6.x and 6.4.x
Also delete user's node_modules and package-lock.json,
Uninstalling yarn globally
But the error stay still.

Main culprit which happened on my local machine is because:

3655 http fetch GET 404 https://registry.npmjs.org/@xtuc%2flong 1866ms
3656 silly fetchPackageMetaData error for @xtuc/[email protected] 404 Not Found: @xtuc/[email protected]
3657 verbose stack RangeError: Maximum call stack size exceeded

this error log was exposed when installing using yarn 1.10.1 before, since the yarn was removed, the error was found on the error log.

I got the same problem

Is there no solution here?

I am having the same issue after bumping "react-scripts" to 2.0.4.

xtuc/long fails.
Maximum call stack size exceeded.
I am not behind a proxy. I can navigate to https://registry.npmjs.org/@xtuc/long

After a long days without luck, finally found a great solution and able to run the command npx create-react app awesome-app, npm init react-app awesome-app and create-react-app awesome-app with npm or yarn as well

The culprit was .npmrc file that was located on your user home dir Users/you/.npmrc. once you remove the files, or remove the contents you should be able to init the CRA2 now.

Happy hacking!

Seems like an npm bug but glad that there is a workaround.

If all else fails, install Yarn, and CRA will use Yarn instead.

@gaearon I'm trying to run npx create-react-app my-app I already installed yarn v1.10.1 and this is what I am getting now

Error: Couldn't find package "@xtuc/ieee754@^1.2.0" required by "@webassemblyjs/[email protected]" on the "npm" registry.
    at MessageError.ExtendableBuiltin (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:243:66)
    at new MessageError (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:272:123)
    at PackageRequest.<anonymous> (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:33701:17)
    at Generator.throw (<anonymous>)
    at step (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:98:30)
    at /usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:111:13
    at run (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:95053:22)
    at /usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:95070:30
    at flush (/usr/local/Cellar/yarn/1.10.1/libexec/lib/cli.js:94576:9)
    at process._tickCallback (internal/process/next_tick.js:172:11)

EDIT: Looks like there is also an issue open here in the YARN repository. It is really weird why this was not tested.

Seems like an npm bug but glad that there is a workaround.

If all else fails, install Yarn, and CRA will use Yarn instead.

man, the workaround you mentioned wasn't helping me (because i don't have an .npmrc file), but the other thing you mentioned is a 2nd workaround & it did help me - installing yarn solved the problem.

change dir to another drive then run npx create-react-app my-app

Was this page helpful?
0 / 5 - 0 ratings