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.

    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
    Python: 2.7.16 - C:\Python27\python.EXE
    Edge: 44.18362.267.0
    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:

  1. gatsby clean - started with this to see if it resolved
  2. deleting node_modules
  3. npm install

It wasn't resolved at this point so I followed the advice to do this:

  1. npm uninstall react react-dom gatsby
  2. npm install react react-dom gatsby

This worked perfectly.

Jonathan Prozzi jonathanprozzi Baltimore, MD Product Designer, UX Engineer Interested in learning, civic hacking, and tools for thought
Github User Rank List