Fixing Gatsby

20 December 2019

After updating, Gatsby gave me the following error:

npm run develop
> gatsby-starter-hello-world@0.1.0 develop /Users/mike/Desktop/gatsby/site
> gatsby develop

The above error occurred in the <StoreStateProvider> component:
    in StoreStateProvider
    in App

Having had a quick look at the issues page, the below worked for me in terms of getting it fixed again:

If you are already running node version 13 —node -v will output the version number — then the node upgrade step can be skipped.

brew upgrade node \ # < should be v13; run this if needs updating
&& npm install gatsby@latest react@latest react-dom@latest \
&& rm -rf node_modules \
&& rm -rf package-lock.json \
&& npm install

Test withnpm run develop