-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ambiguous "StoreStateProvider" error for all gatsby commands #19827
Comments
I am experiencing the same issue after the update from 2.17.10 to 2.18.4 |
Thank you for reporting! Could you also try upgrading gatsby-cli? If this doesn't help, it'd be really helpful if you could provide us with a reproduction repository. Thank you! 💜 |
I don't actually have the CLI installed globally. The project relies on Using that pattern people aren't required to litter their machine with a global dependency. (Which may get ugly if you work on several projects, which potentially require different versions) |
I had a similar problem earlier today, what worked for me was to update react, react-dom and gatsby, erase node_modules and package-lock.json. Finally I run npm install again and everything worked fine |
Updating |
Yesterday I've spent half day just to find out that In my case gatsby build/develop is working fine when deps are installed with yarn. |
Seems like it has to do with a compatibility issue between React and Gatsby. If you're installing dependencies from scratch (without a lock file) your package manager (either yarn or npm) will just get the latest (allowed by restraints in package.json) version. In my case, the react version was locked down in my |
I'm experiencing the same issue. I've updated gatsby, gatsby-cli, react and react-dom with no success. Is there a definitive solution? EDIT: I removed gatsby and gatsby-cli and reinstalled them individually and that seems to have fixed it. Weird issue. |
I hit this issue. It's because there's two versions of react installed. Run an I learned of the issue through this page. Still trying to fix the issue... |
I fixed the problem! I used npm to uninstall, then (re)install
|
While I'm unblocked for now, I still have concerns:
Don't have answers, but voicing my concerns for the gatsby team to consider. |
I’m pretty sure |
I had the same issue after updating gatsby. I downgraded to my previous version "gatsby": "^2.13.73" which is several versions back but it fixed the issue. |
This worked for me. Thanks! |
Ditto to the above, this solution fixed things for me as well. |
I've successfully resolve the issue by upgrading react and react-dom to 16.12.0 and then upgrade gatsby to 2.18.7. Important: Make sure you run "gatsby clean" after upgrading react, react-dom and gatsby. |
Upgrading gatsby to 2.18.7 as suggested by @clarmso did the trick for me (react is at 16.12.0). |
Also having this same issue. Updated react and gatsby but still having the same issues. Also tried to clean after update, issue persists. "gatsby": "^2.18.11" |
Same for me. Until yestarday has worked fine |
This worked for me as well. Is this being worked on for a permanent fix? Because of these updates I'm now getting more weird warnings of StoreStateProvider and random things in Contentful coming back as null even though they are there. Not sure what's been going but I'm going to have to keep this on a branch for now |
Removed node_modules folder & package-lock.json file. Ran npm install and all good again. |
My experience was a combination of the above comments. Since I deleted the node_modules folder and I had gatsby plugins, the npm wouldn't work. Yarn install finally fixed it. |
I fixed this problem by reinstalling before
after
|
Thank you, it's worked for me 🍾 |
Personally I have to delete
Don't forget to update |
I was having this same problem, what I did was delete my json.lock and run the yarn command to update the dependencies. and everything went back to working normally. |
I encountered the same problem that I solved by deleting the "node_modules" folder and "package-lock.json" file then "npm install" command. |
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. 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. Thanks again for being part of the Gatsby community! 💪💜 |
🙁 I'm still using |
This worked for me... |
Uninstalling and re-installing |
use yarn install, that should work |
So what I did (after reading everything so far) was I changed the version in the package.json file of Gatsby 2.18.7 and ran |
Still running into this issue.
Steps to reproduce:
Result
This was fixed by implementing the instructions by doing the following as described above ☝️
|
Removing .cache and node_modules folders, and package-lock.json and then reinstalling worked for me. |
Dei uma yarn upgrade e deu certo pra mim. |
Removing The underlying issue in my case was that a new project provisioned using It would be preferable for the gatsby cli to not default to a |
#26887 (merged yesterday and released today) which removes @duchess-toffee You might find #26856 interesting (not merged/released yet) - while it won't auto revert from |
I've had an issue seemingly linked to this problem #26998 Solved using a custom webpack config to resolve // file: gatsby-node.js
const path = require('path')
module.exports = {
onCreateWebpackConfig: ({ actions }) => {
actions.setWebpackConfig({
resolve: {
alias: {
'react': path.resolve(path.join(__dirname, 'node_modules', 'react'))
}
}
})
}
} // file: package.json
{
"dependencies": {
"@mdx-js/mdx": "^1.6.18",
"@mdx-js/react": "^1.6.18",
"gatsby": "^2.24.64",
"gatsby-plugin-layout": "^1.3.11",
"gatsby-plugin-mdx": "^1.2.40",
"gatsby-plugin-sass": "^2.3.12",
"gatsby-source-filesystem": "^2.3.30",
"gatsby-telemetry": "^1.3.35",
"node-sass": "^4.14.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-ionicons-v5": "^1.2.0",
"three": "^0.120.1"
}
} Everything runs smoothly now. |
When attempting to run the website in development, after making no changes, I was greeted with the following error message: > The above error occurred in the <StoreStateProvider> component: > in StoreStateProvider > in App After some digging, I dsocvered I needed to update React, React DOM, and Gatsby. See: gatsbyjs/gatsby#19827 Then after resolving the above issue, I found this error message when actually viewing the development server: > Error: React-Hot-Loader: AppContainer should be patched See: gatsbyjs/gatsby#26979
Even though I am a developer noob, I've got to share how I fixed this incase it helps anyone else: I was trying to spin up Gatsby/Sanity blog from I went into the /web directory and checked the React versions using FIX: npm install gatsby-cli in the web directory. Then |
This worked for me!
|
Amazing... spent a couple of days trying figure things out, this worked for me.
|
Description
After updating Gatsby from 2.17.7 to 2.18.4, running any kind of gatsby command causes an error. There is literally no context though.
Environment
Unfortunately, I can't run
gatsby info --clipboard
, since it crashes with the sameStateStoreProvider
error as the other commands. I reverted my Gatsby version again and ran this command. Note that the Gatsby version in the output below is incorrect.The text was updated successfully, but these errors were encountered: