Skip to content
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

This project cannot be run from a fresh install #4

Open
tanvibhakta opened this issue Nov 25, 2019 · 0 comments
Open

This project cannot be run from a fresh install #4

tanvibhakta opened this issue Nov 25, 2019 · 0 comments

Comments

@tanvibhakta
Copy link

Steps to reproduce:

  1. Clone this project
  2. Install all dependencies
  3. gatsby develop gives an error related to hooks.

I don't know how to go about fixing this issue because I've never worked with hooks before - hopefully this is something simple?

Pasting the error received below:

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.

 ERROR

UNHANDLED REJECTION Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.



  Error: Invalid hook call. Hooks can only be called inside of the body of a function compone  nt. This could happen for one of the following reasons:
  1. You might have mismatching versions of React and the renderer (such as React DOM)
  2. You might be breaking the Rules of Hooks
  3. You might have more than one copy of React in the same app
  See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.
  - react.development.js:1590 resolveDispatcher
    [my-awesome-site]/[gatsby]/[react]/cjs/react.development.js:1590:13

  - react.development.js:1618 useState
    [my-awesome-site]/[gatsby]/[react]/cjs/react.development.js:1618:20

  - context.js:17 StoreStateProvider
    [my-awesome-site]/[gatsby]/[gatsby-cli]/lib/reporter/loggers/ink/context.js:17:41

  - react-reconciler.development.js:5671 renderWithHooks
    [my-awesome-site]/[react-reconciler]/cjs/react-reconciler.development.js:5671:18

  - react-reconciler.development.js:7905 mountIndeterminateComponent
    [my-awesome-site]/[react-reconciler]/cjs/react-reconciler.development.js:7905:13

  - react-reconciler.development.js:9049 beginWork$1
    [my-awesome-site]/[react-reconciler]/cjs/react-reconciler.development.js:9049:16

  - react-reconciler.development.js:10317 Object.invokeGuardedCallbackImpl
    [my-awesome-site]/[react-reconciler]/cjs/react-reconciler.development.js:10317:10

  - react-reconciler.development.js:10501 invokeGuardedCallback
    [my-awesome-site]/[react-reconciler]/cjs/react-reconciler.development.js:10501:31

  - react-reconciler.development.js:14014 beginWork$$1
    [my-awesome-site]/[react-reconciler]/cjs/react-reconciler.development.js:14014:7

  - react-reconciler.development.js:13008 performUnitOfWork
    [my-awesome-site]/[react-reconciler]/cjs/react-reconciler.development.js:13008:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant