gatsby: gatsby-cli 2.6.12 error: RangeError: Maximum call stack size exceeded
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
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 31 (11 by maintainers)
Commits related to this issue
- Bugfix with yarn package upgrade troubleshoot version issue with yarn upgrade command, see https://github.com/gatsbyjs/gatsby/issues/14911 — committed to egonbohler/eponymdesignco.github.io by brysonbohlerwedding 5 years ago
I don’t think this issue should be closed since it breaks the Gatsby development experience from the get go. Using
yarnwork for me too.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
Error:
Any idea?
Thank you. I’m just using “yarn upgrade” since yarn update is not available"
Interesting, using npm commands those packages still produce the error for me, but using yarn it all worked. Thanks!
Thanks so much for opening this issue! Tis should be fixed in version
gatsby-cli@2.6.13&gatsby@2.9.10. Sorry for the inconveniences.If this is not the case, or if we can help further–please don’t hesitate to reach out or comment on this issue, and we’d love to take another look.
Thanks for using Gatsby 💪
To help us best begin debugging the underlying cause, it is incredibly helpful if you’re able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.
If you’re up for it, we’d very much appreciate if you could provide a minimal reproduction and we’ll be able to take another look.
Thanks for using Gatsby! 💜
NPM USERS
It seems like npm isn’t installing peer dependencies correctly. You need to make sure react is at least on version 16.8.4 in your project.
For https://github.com/gyss/gatsby-starter, the package.json needs to change into
package.json
</detail>Holy sh*t! This works. I’ve never used
yarnbefore so that was definitely not the first place I looked.Thank you @jhach and @emiliekmartinez !
Now… if there was only a good reason why
yarnworks andnpmdoesn’t, that’d be cool 😃Upgraded to latest version of gatsby / gatsby-cli / gatsby plugins and everything works perfectly. Thanks a lot
I intended to post what worked for me in addition to what worked for others as shown in the other posts. My remedy is just another tool on the swiss army knife here 😃
try to delete your
package-lock.jsonWas having a similar problem when trying to run a project on a new POP!_OS install. Would try and run
gatsby developand the terminal would spit this out:Then I tried
npm startand got this output:And because I didn’t want to switch to yarn I tried
npm upgradeand got this output:And ran ‘npm start’ and VIOLAY, the project started on local host.
@jimmyromanticdevil 's solution fixed it for me.
yarn upgradedid the trick.Environment: