Closed aharris closed 4 years ago
I was able to resolve this eventually locally by deleting my global gatsby-cli
and specifying the old gatsby-cli
directly:
"gatsby": "2.13.50",
"gatsby-cli": "2.7.26"
Debugging this issue though caused significant down time that could be resolved by using exact version.
Hey, are you able to share your project? I was able to reproduce some issue with following package versions:
➜ i18728 git:(master) ✗ npm list gatsby-cli
gatsby-starter-default@0.1.0 /Users/misiek/test/i18728
└─┬ gatsby@2.13.50
└── gatsby-cli@2.8.1
But issue I had was different than one you reported:
⠀
/Users/misiek/test/i18728/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
throw ex;
^
TypeError: report._setStage is not a function
I'll work on fixing that part, but it seems like completely different issue than you had
@pieh I had the same issue as you after updating gatsby-cli where the yoga-layout-prebuilt module was throwing the error, but I imagine these are related.
Node 12.4.0 npm 6.10.3
package.json:
{ "dependencies": { "bootstrap": "^4.3.1", "gatsby": "^2.15.29", "gatsby-cli": "^2.8.1", "gatsby-image": "^2.2.24", "gatsby-plugin-manifest": "^2.2.20", "gatsby-plugin-netlify-cms": "^4.1.22", "gatsby-plugin-offline": "^2.2.10", "gatsby-plugin-react-helmet": "^3.1.10", "gatsby-plugin-sass": "^2.1.17", "gatsby-plugin-sharp": "^2.2.28", "gatsby-source-filesystem": "^2.1.29", "gatsby-transformer-json": "^2.2.12", "gatsby-transformer-remark": "^2.6.27", "gatsby-transformer-sharp": "^2.2.20", "netlify-cms": "^2.9.7", "node-sass": "^4.12.0", "react": "^16.10.2", "react-bootstrap": "^1.0.0-beta.14", "react-dom": "^16.10.2", "react-helmet": "^5.2.1", "react-image-video-lightbox": "^2.0.1", "react-modal": "^3.10.1", "react-on-screen": "^2.1.1", "react-player": "^1.13.0", "react-reading-progress": "^0.3.0", "react-responsive": "^8.0.1", "react-scroll-parallax": "^2.2.0", "react-scrollchor": "^6.0.0", "react-transition-group": "^4.3.0", "read-more-react": "^1.0.9", "slick-carousel": "^1.8.1", "slugify": "^1.3.5" }, "devDependencies": { "prettier": "^1.18.2" }, }
Run gatsby info --clipboard in your project directory and paste the output here.
System: OS: Windows 10 CPU: (4) x64 Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz Binaries: npm: 6.10.3 - C:\Program Files\nodejs\npm.CMD Languages: Python: 2.7.13 - /c/Python27/python Browsers: Edge: 44.17763.771.0 npmPackages: gatsby: ^2.15.29 => 2.15.29 gatsby-cli: ^2.8.1 => 2.8.1 gatsby-image: ^2.2.24 => 2.2.24 gatsby-plugin-manifest: ^2.2.20 => 2.2.20 gatsby-plugin-netlify-cms: ^4.1.22 => 4.1.22 gatsby-plugin-offline: ^2.2.10 => 2.2.10 gatsby-plugin-react-helmet: ^3.1.10 => 3.1.10 gatsby-plugin-sass: ^2.1.17 => 2.1.17 gatsby-plugin-sharp: ^2.2.28 => 2.2.28 gatsby-source-filesystem: ^2.1.29 => 2.1.29 gatsby-transformer-json: ^2.2.12 => 2.2.12 gatsby-transformer-remark: ^2.6.27 => 2.6.27 gatsby-transformer-sharp: ^2.2.20 => 2.2.20
@pieh I also saw that issue when I tried to install via yarn instead of npm for some reasons. I didn't look into it further and kept debugging with npm.
@aharris I tried both yarn and npm, and both results were similiar when pinning gatsby version (so I was getting pre 2.16 gatsby and post 2.8 gatsby-cli) - in both cases I was getting report._setStage is not a function
, but wasn't able to reproduce error you reported
The above error occurred in the <ReduxStoreProvider> component:
in ReduxStoreProvider
in App
React will try to recreate this component tree from scratch using the error boundary you provided, App.
Which lead me to believe that there is more needed to get that problem than just mismatched package versions (that's why I asked for reproduction)
@pieh thanks for looking into this. Unfortunately I cannot share the code. I have it working for me by rolling back to 2.7.26. I just think changes to packages should be opt in, not forced behind the scenes. Using exact versions would prevent both of these error messages from coming out of no where forcing unnecessary debug time.
Yeah, that's valid point about pinning our own deps. Even if do that we can't fix already released package versions tho :S
I'm quite new to gatsby and faced this same issue. The reason for the issue for me was that I had chosen yarn
during the creation of the new project I was working on but later on I was using npm
to install the packages. I deleted the new plugins I had installed with npm, deleted the package-lock.json
file and reinstalled the plugins using yarn
and the error was gone.
If you're running multiple Gatsby instances in a mono/lerna repo make sure the versions are pinned across all of them consistently otherwise this and/or other errors will popup
@nc9 Thanks, this was what was causing the issue for me. Different versions of Gatsby in different workspaces. Running yarn upgrade-interactive
and upgrading all Gatsby packages to the latest version solved the issue.
Hiya!
This issue has gone quiet. Spooky quiet. 👻
We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! 💪💜
Hey again!
It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY
. Please feel free to reopen this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks again for being part of the Gatsby community! 💪💜
Description
Gatsby 2.13.50 uses a
^
to includegatsby-cli
. This lead to in npm install causing us to pull in an incompatible version of the gatsby cli.This version causes the error:
Steps to reproduce
In an existing project running gatsby@2.13.50
Clear steps describing how to reproduce the issue. Please please please link to a demo project if possible, this makes your issue much easier to diagnose (seriously).
How to Make a Minimal Reproduction: https://www.gatsbyjs.org/contributing/how-to-make-a-reproducible-test-case/
Expected result
The app builds.
Actual result
Environment
node v10.16.3 npm 6.9.0
package.json:
Run
gatsby info --clipboard
in your project directory and paste the output here.