Ask questionsAmbiguous "StoreStateProvider" error for all gatsby commands
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.
> gatsby clean The above error occurred in the <StoreStateProvider> component: in StoreStateProvider in App React will try to recreate this component tree from scratch using the error boundary you provided, App. Warning: App: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.
> gatsby build The above error occurred in the <StoreStateProvider> component: ...
Unfortunately, I can't run
gatsby info --clipboard, since it crashes with the same
StateStoreProvider 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.
System: OS: Windows 10 CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz Binaries: npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD Languages: Python: 2.7.16 - C:\Python27\python.EXE Browsers: Edge: 44.18362.267.0 npmPackages: gatsby: ^2.17.7 => 2.17.7 gatsby-source-apiserver: ^2.1.4 => 2.1.4
Answer questions jonathanprozzi
I ran into this issue today when running
gatsby develop on an older project (last time running gatsby develop was in the Fall)
I fixed by doing a combination of the above (very helpful!) suggestions.
Can confirm this worked:
gatsby clean- started with this to see if it resolved
It wasn't resolved at this point so I followed the advice to do this:
npm uninstall react react-dom gatsby
npm install react react-dom gatsby
This worked perfectly.