question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gatsby-cli 2.6.12 error: RangeError: Maximum call stack size exceeded

See original GitHub issue

Description

After using yarn upgrade and then yarn start, I now get an error RangeError: Maximum call stack size exceeded

I’ve seen a related issue with React Helmet, from my tests doesn’t seem to be related to this.

Steps to reproduce

yarn upgrade
yarn start

Expected result

No errors!

Actual result

/mnt/d/ee/hello-world/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

RangeError: Maximum call stack size exceeded
    at Array.values (<anonymous>)
    at Object.console.error (/mnt/d/ee/hello-world/node_modules/gatsby-cli/lib/reporter/index.js:216:50)
    at warningWithoutStack (/mnt/d/ee/hello-world/node_modules/react-reconciler/cjs/react-reconciler.development.js:100:32)
    at warnAboutUpdateOnUnmounted (/mnt/d/ee/hello-world/node_modules/react-reconciler/cjs/react-reconciler.development.js:10458:5)
    at scheduleWork (/mnt/d/ee/hello-world/node_modules/react-reconciler/cjs/react-reconciler.development.js:11868:11)
    at Object.enqueueSetState (/mnt/d/ee/hello-world/node_modules/react-reconciler/cjs/react-reconciler.development.js:3152:5)
    at GatsbyReporter.Component.setState (/mnt/d/ee/hello-world/node_modules/react/cjs/react.development.js:335:16)
    at GatsbyReporter._addMessage (/mnt/d/ee/hello-world/node_modules/gatsby-cli/lib/reporter/reporters/ink/reporter.js:132:10)
    at Object.error (/mnt/d/ee/hello-world/node_modules/gatsby-cli/lib/reporter/index.js:82:22)
    at Object.console.error (/mnt/d/ee/hello-world/node_modules/gatsby-cli/lib/reporter/index.js:216:39)
    at warningWithoutStack (/mnt/d/ee/hello-world/node_modules/react-reconciler/cjs/react-reconciler.development.js:100:32)
    at warnAboutUpdateOnUnmounted (/mnt/d/ee/hello-world/node_modules/react-reconciler/cjs/react-reconciler.development.js:10458:5)
    at scheduleWork (/mnt/d/ee/hello-world/node_modules/react-reconciler/cjs/react-reconciler.development.js:11868:11)
    at Object.enqueueSetState (/mnt/d/ee/hello-world/node_modules/react-reconciler/cjs/react-reconciler.development.js:3152:5)
    at GatsbyReporter.Component.setState (/mnt/d/ee/hello-world/node_modules/react/cjs/react.development.js:335:16)
    at GatsbyReporter._addMessage (/mnt/d/ee/hello-world/node_modules/gatsby-cli/lib/reporter/reporters/ink/reporter.js:132:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! pedrolamas.com@0.1.0 develop: `gatsby develop`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the pedrolamas.com@0.1.0 develop script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pedro/.npm/_logs/2019-06-19T13_19_45_344Z-debug.log
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Environment

Running on Windows 10 latest version via WSL!

  System:
    OS: Linux 4.4 Ubuntu 18.04.2 LTS (Bionic Beaver) -> Windows WSL
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
    Shell: 4.4.19 - /bin/bash
  Binaries:
    Node: 12.4.0 - /usr/bin/node
    Yarn: 1.16.0 - /usr/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
  Languages:
    Python: 2.7.15+ - /usr/bin/python
  npmPackages:
    gatsby: ^2.9.4 => 2.9.9
    gatsby-cli: ^2.6.12 => 2.6.12
    gatsby-image: ^2.1.4 => 2.1.4
    gatsby-mdx: ^0.6.3 => 0.6.3
    gatsby-plugin-eslint: ^2.0.5 => 2.0.5
    gatsby-plugin-manifest: ^2.1.1 => 2.1.1
    gatsby-plugin-offline: ^2.1.3 => 2.1.3
    gatsby-plugin-react-helmet: ^3.0.12 => 3.0.12
    gatsby-plugin-sass: ^2.0.13 => 2.0.13
    gatsby-plugin-sharp: ^2.1.9 => 2.1.9
    gatsby-plugin-typescript: ^2.0.15 => 2.0.15
    gatsby-remark-images: ^3.0.16 => 3.0.16
    gatsby-source-filesystem: ^2.0.43 => 2.0.43
    gatsby-transformer-sharp: ^2.1.21 => 2.1.21
    gatsby-transformer-yaml: ^2.1.12 => 2.1.12
  npmGlobalPackages:
    gatsby-cli: 2.6.12

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:31 (10 by maintainers)

github_iconTop GitHub Comments

13reactions
ancashoriacommented, Jun 29, 2019

I don’t think this issue should be closed since it breaks the Gatsby development experience from the get go. Using yarn work for me too.

9reactions
gysscommented, Jun 25, 2019

I’m having the same outcome as @PedroLamas. But updating to the latest version or the versions proposed by @wardpeet gives me the same error after running gatsby develop.

Node: 10.12.0 NPM: 6.4.1

Package.json

"dependencies": {
    "classnames": "2.2.6",
    "gatsby": "2.10.4",
    "path": "0.12.7",
    "prismjs": "1.15.0",
    "react": "16.6.3",
    "react-dom": "16.6.3",
    "react-helmet": "5.2.0",
    "react-hubspot-form": "1.3.7",
    "react-scroll": "1.7.10",
    "swagger-ui": "3.22.0"
  },
  "devDependencies": {
    "@babel/core": "7.2.2",
    "babel-core": "7.0.0-bridge.0",
    "babel-jest": "23.6.0",
    "babel-preset-gatsby": "0.2.0",
    "gatsby-cli": "2.7.2",
    "gatsby-plugin-google-analytics": "2.1.0",
    "gatsby-plugin-manifest": "2.2.0",
    "gatsby-plugin-no-sourcemaps": "2.1.0",
    "gatsby-plugin-purgecss": "4.0.0",
    "gatsby-plugin-react-helmet": "3.1.0",
    "gatsby-plugin-robots-txt": "1.4.0",
    "gatsby-plugin-sass": "2.1.0",
    "gatsby-remark-autolink-headers": "2.1.0",
    "gatsby-remark-prismjs": "3.3.0",
    "gatsby-source-filesystem": "2.1.0",
    "gatsby-transformer-remark": "2.5.0",
    "identity-obj-proxy": "^3.0.0",
    "jest": "23.6.0",
    "node-sass": "4.12.0",
    "prettier": "1.15.3",
    "react-test-renderer": "16.7.0"
  }

Error:

/Users/user/project/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

RangeError: Maximum call stack size exceeded
    at Array.values (<anonymous>)
    at Object.format (util.js:73:10)
    at Console.console.error.args [as error] (/Users/user/project/node_modules/gatsby/node_modules/gatsby-cli/lib/reporter/index.js:216:48)
    at warningWithoutStack (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.development.js:100:32)
    at warnAboutUpdateOnUnmounted (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.development.js:10458:5)
    at scheduleWork (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.development.js:11868:11)
    at Object.enqueueSetState (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.development.js:3152:5)
    at GatsbyReporter.Component.setState (/Users/user/project/node_modules/gatsby/node_modules/react/cjs/react.development.js:335:16)
    at GatsbyReporter._addMessage (/Users/user/project/node_modules/gatsby/node_modules/gatsby-cli/lib/reporter/reporters/ink/reporter.js:132:10)
    at Console.console.error.args [as error] (/Users/user/project/node_modules/gatsby/node_modules/gatsby-cli/lib/reporter/index.js:216:39)
    at warningWithoutStack (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.development.js:100:32)
    at warnAboutUpdateOnUnmounted (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.development.js:10458:5)
    at scheduleWork (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.development.js:11868:11)
    at Object.enqueueSetState (/Users/user/project/node_modules/react-reconciler/cjs/react-reconciler.development.js:3152:5)
    at GatsbyReporter.Component.setState (/Users/user/project/node_modules/gatsby/node_modules/react/cjs/react.development.js:335:16)
    at GatsbyReporter._addMessage (/Users/user/project/node_modules/gatsby/node_modules/gatsby-cli/lib/reporter/reporters/ink/reporter.js:132:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR!docs@1.0.0 dev: `gatsby develop --open --host 0.0.0.0 --port 3000`
npm ERR! Exit status 7

Any idea?

Read more comments on GitHub >

github_iconTop Results From Across the Web

RangeError: Maximum call stack size exceeded
You are getting Maximum call stack size exceeded because your function is an infinite loop. if(true) will always be true, so your first ......
Read more >
After Build Via Webpack 5 App Stoped Working On Internet ...
35 gatsby gatsby-cli 2.6.12 error: RangeError: Maximum call stack size exceeded. You need to set up Babel and webpack before you start coding....
Read more >
How to fix npm maximum call stack size exceeded error
First, make sure that you are using the latest NodeJS and npm versions for your project. Now the npm install command sometimes builds...
Read more >
gatsby-cli - npm
The Gatsby command line interface (CLI) is the main tool you use to initialize, build and develop Gatsby sites.
Read more >
How to fix: "RangeError: Maximum call stack size exceeded"
A "RangeError: Maximum call stack size exceeded" is an error that occurs when a function or operation tries to execute too many nested...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found