gatsby-theme-portfolio-minimal icon indicating copy to clipboard operation
gatsby-theme-portfolio-minimal copied to clipboard

Error while building fresh project

Open promentol opened this issue 1 year ago • 2 comments

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 avatar Aug 01 '22 13:08 promentol

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"
  },

promentol avatar Aug 01 '22 13:08 promentol

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

konstantinmuenster avatar Aug 01 '22 18:08 konstantinmuenster