profile
viewpoint

Ask questionsAmbiguous "StoreStateProvider" error for all gatsby commands

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.

> 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:

...

Environment

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
gatsbyjs/gatsby

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.

useful!
source:https://uonfu.com/
answerer
Jonathan Prozzi jonathanprozzi Baltimore, MD https://jonathanprozzi.net Product Designer, UX Engineer Interested in learning, civic hacking, and tools for thought
Github User Rank List