konstantinmuenster / gatsby-theme-portfolio-minimal

A Gatsby Theme to create modern one-page portfolios with a clean yet expressive design.
MIT License
161 stars 91 forks source link

Error while building fresh project #11

Closed promentol closed 1 year ago

promentol commented 2 years ago

I am getting the following error while building the project for production. For development it's running fine

 ERROR #95313 

Building static HTML failed for path "/blog"

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

  631 |
  632 |   if (!context) {
> 633 |     throw new Error("useLocation hook was used but a 
LocationContext.Provider was not found in the parent tree. Make sure this is 
used in a component that is a child of Router");
      | ^
  634 |   }
  635 |
  636 |   return context.location;

  WebpackError: useLocation hook was used but a LocationContext.Provider was not
   found in the parent tree. Make sure this is used in a component that is a chi
  ld of Router
promentol commented 2 years ago

Here are the versions of packages I am using

  "engines": {
    "node": ">=16.0.0"
  },
  "dependencies": {
    "gatsby": "^4.18.2",
    "gatsby-link": "^4.19.1",
    "gatsby-plugin-sharp": "^4.19.0",
    "gatsby-react-router-scroll": "^5.19.0",
    "gatsby-script": "^1.4.0",
    "gatsby-theme-portfolio-minimal": "latest",
    "react": "^17.0.2",
    "react-dom": "^17.0.2"
  },
konstantinmuenster commented 2 years ago

hey, thanks for opening this! Do you get the error as well if you are creating and building an entirely new project using

gatsby new portfolio-minimal https://github.com/konstantinmuenster/gatsby-starter-portfolio-minimal-theme