How to resolve error #95313 when building a gatsby site?

Viewed 1062

I have finished working on my gatsby project, but I have problem when trying to build. I got this #95313 error. I do not have any errors in project.

 ERROR 

Page data from page-data.json for the failed page "/success/": {
  "componentChunkName": "component---src-pages-success-index-tsx",
  "path": "/success/",
  "result": {
    "pageContext": {}
  },
  "staticQueryHashes": []
}

failed Building static HTML for pages - 1.268s

 ERROR #95313 

Building static HTML failed for path "/success/"

See our docs page for more info on this error: https://gatsby.dev/debug-html

  WebpackError: TypeError: Cannot read property 'store' of null

  - useSelector.js:126 
    [my-gatsby-site]/[react-redux]/es/hooks/useSelector.js:126:1

  - index.tsx:13
    webpack:/my-gatsby-site/src/pages/success/index.tsx:13:42

  - static-entry.js:286
    webpack:/my-gatsby-site/.cache/static-entry.js:286:22

  - stylis.esm.js:74
    [my-gatsby-site]/[@emotion]/stylis/dist/stylis.esm.js:74:1

How can I resolve it? Thank you for your help.

1 Answers
Related