question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error Building static HTML failed for path "/home/"

See original GitHub issue

Hello, I have the error when I run the build, error has failed for the path, I have no idea where this error occurs.

error Building static HTML failed for path "/home/"

See our docs page on debugging HTML builds for help https://gatsby.dev/debug-html

   7 | 
   8 |   if (isProduction) {
>  9 |     throw new Error(prefix);
     | ^
  10 |   } else {
  11 |     throw new Error(prefix + ": " + (message || ''));
  12 |   }

  WebpackError: Invariant failed
  
  - tiny-invariant.esm.js:9 invariant
    [lib]/[tiny-invariant]/dist/tiny-invariant.esm.js:9:1
  
  - history.js:250 createBrowserHistory
    [lib]/[history]/esm/history.js:250:115
  
  - react-router-dom.js:29 new BrowserRouter
    [lib]/[react-router-dom]/esm/react-router-dom.js:29:41
  
  - bootstrap:22 c
    lib/webpack/bootstrap:22:1
  
  - bootstrap:25 Sa
    lib/webpack/bootstrap:25:1
  
  - bootstrap:30 a.render
    lib/webpack/bootstrap:30:1
  
  - bootstrap:30 a.read
    lib/webpack/bootstrap:30:1
  
  - bootstrap:42 renderToString
    lib/webpack/bootstrap:42:1
  
  - static-entry.js:194 Module../.cache/static-entry.js.__webpack_exports__.default
    lib/.cache/static-entry.js:194:18
  
  - bootstrap:24 Promise
    lib/webpack/bootstrap:24:1
 
  - gatsby-browser-entry.js:19 Promise._resolveFromExecutor
    lib/.cache/gatsby-browser-entry.js:19:9
  
  - bootstrap:68 new Promise
    lib/webpack/bootstrap:68:1
  
  - bootstrap:5 tryCatcher
    lib/webpack/bootstrap:5:1
  
  - bootstrap:50 MappingPromiseArray._promiseFulfilled
    lib/webpack/bootstrap:50:1`

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
sidharthachatterjeecommented, Mar 22, 2019

@antonioc57 This typically occurs when there is an error during server side rendering in gatsby build

Based on your stack trace, it looks like it is coming from react-router-dom. Gatsby v2 includes reach router for routing so you shouldn’t need to include react-router-dom.

5reactions
danny-0805commented, Mar 24, 2020

Got same error:

Building static HTML failed for path "/404/"

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


  Error: Minified React error #294; visit https://reactjs.org/docs/error-decoder.html?invariant=294 for the full message or use the non-minified dev environment f  or full errors and additional helpful warnings.

  - react-dom-server.node.production.min.js:46 a.b.render
    [myproject]/[react-dom]/cjs/react-dom-server.node.production.min.js:46:17

  - react-dom-server.node.production.min.js:44 a.b.read
    [myproject]/[react-dom]/cjs/react-dom-server.node.production.min.js:44:18

  - react-dom-server.node.production.min.js:54 renderToString
    [myproject]/[react-dom]/cjs/react-dom-server.node.production.min.js:54:364

  - render-page.js:612 Module../.cache/static-entry.js.__webpack_exports__.default
    E:/myproject/public/render-page.js:612:28

  - render-html.js:28 
    [myproject]/[gatsby]/dist/utils/worker/render-html.js:28:36

  - debuggability.js:384 Promise._execute
    [myproject]/[bluebird]/js/release/debuggability.js:384:9

  - promise.js:518 Promise._resolveFromExecutor
    [myproject]/[bluebird]/js/release/promise.js:518:18

  - promise.js:103 new Promise
    [myproject]/[bluebird]/js/release/promise.js:103:10

  - render-html.js:24 
    [myproject]/[gatsby]/dist/utils/worker/render-html.js:24:47

  - util.js:16 tryCatcher
    [myproject]/[bluebird]/js/release/util.js:16:23

  - map.js:68 MappingPromiseArray._promiseFulfilled
    [myproject]/[bluebird]/js/release/map.js:68:38

  - promise_array.js:115 MappingPromiseArray.PromiseArray._iterate
    [myproject]/[bluebird]/js/release/promise_array.js:115:31

  - promise_array.js:79 MappingPromiseArray.init
    [myproject]/[bluebird]/js/release/promise_array.js:79:10

  - map.js:37 MappingPromiseArray._asyncInit
    [myproject]/[bluebird]/js/release/map.js:37:10

  - async.js:97 _drainQueueStep
    [myproject]/[bluebird]/js/release/async.js:97:12

  - async.js:86 _drainQueue
    [myproject]/[bluebird]/js/release/async.js:86:9


not finished Generating image thumbnails - 228.649s

dependencies I am using:

"dependencies": {
    "axios": "^0.19.2",
    "browser-lang": "^0.0.1",
    "checkout-js-library": "^1.1.7",
    "core-js": "^3.6.4",
    "currency.js": "^1.2.2",
    "gatsby": "^2.19.19",
    "gatsby-cli": "^2.10.6",
    "gatsby-image": "^2.2.39",
    "gatsby-link": "^2.2.28",
    "gatsby-paginate": "^1.1.1",
    "gatsby-plugin-algolia": "^0.5.0",
    "gatsby-plugin-alias-imports": "^1.0.5",
    "gatsby-plugin-analytics": "^0.2.0",
    "gatsby-plugin-catch-links": "^2.0.2",
    "gatsby-plugin-dark-mode": "^1.1.0",
    "gatsby-plugin-facebook-analytics": "^2.2.20",
    "gatsby-plugin-facebook-pixel": "^1.0.3",
    "gatsby-plugin-feed": "^2.0.5",
    "gatsby-plugin-firebase": "^0.1.8",
    "gatsby-plugin-google-analytics": "^2.1.34",
    "gatsby-plugin-google-fonts": "^1.0.1",
    "gatsby-plugin-guess-js": "^1.1.31",
    "gatsby-plugin-i18n": "^1.0.1",
    "gatsby-plugin-intercom-spa": "^0.2.0",
    "gatsby-plugin-intl": "^0.3.3",
    "gatsby-plugin-layout": "^1.0.2",
    "gatsby-plugin-lint-queries": "^0.0.3",
    "gatsby-plugin-mailchimp": "^5.1.2",
    "gatsby-plugin-manifest": "^2.2.40",
    "gatsby-plugin-netlify": "^2.0.0",
    "gatsby-plugin-nprogress": "^2.1.18",
    "gatsby-plugin-offline": "^3.0.33",
    "gatsby-plugin-prefetch-google-fonts": "^1.4.3",
    "gatsby-plugin-provide-react": "^1.0.0",
    "gatsby-plugin-react-helmet": "^3.1.21",
    "gatsby-plugin-react-redux": "^1.1.0-0",
    "gatsby-plugin-react-svg": "^3.0.0",
    "gatsby-plugin-remove-trailing-slashes": "^2.1.22",
    "gatsby-plugin-robots-txt": "^1.5.0",
    "gatsby-plugin-sentry": "^1.0.1",
    "gatsby-plugin-sharp": "^2.4.4",
    "gatsby-plugin-sitemap": "^2.2.26",
    "gatsby-plugin-styled-components": "^3.1.18",
    "gatsby-plugin-styled-jsx": "^3.0.1",
    "gatsby-plugin-web-font-loader": "^1.0.4",
    "gatsby-remark-copy-linked-files": "^2.0.5",
    "gatsby-remark-emojis": "^0.2.3",
    "gatsby-remark-external-links": "^0.0.4",
    "gatsby-remark-images": "^3.1.43",
    "gatsby-remark-prismjs": "^3.3.30",
    "gatsby-source-filesystem": "^2.1.47",
    "gatsby-source-googlemaps-geocoding": "^1.0.0",
    "gatsby-source-instagram": "^0.7.0",
    "gatsby-source-magento": "file:plugins/gatsby-source-magento",
    "gatsby-source-wordpress": "file:plugins/gatsby-source-wordpress",
    "gatsby-transformer-json": "^2.2.25",
    "gatsby-transformer-remark": "^2.6.49",
    "gatsby-transformer-sharp": "^2.3.13",
    "moment": "^2.24.0",
    "postscribe": "^2.0.8",
    "prismjs": "^1.15.0",
    "prop-types": "^15.7.2",
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "react-helmet": "^5.2.1",
    "react-icons": "^3.9.0",
    "react-intl": "^2.8.0",
    "react-redux": "^7.1.3",
    "recompose": "^0.30.0",
    "redux": "^4.0.5",
    "redux-thunk": "^2.3.0",
  },
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Building static HTML failed for path "/home/" · Issue #22594
Description. `Building static HTML failed for path "/404/". See our docs page for more info on this error: https://gatsby.dev/debug-html.
Read more >
Building static HTML failed for path "/styles/" - Gatsby ...
It says to use a non-minified command, but gatsby develop doesn't throw any error so I'm a bit unsure on how to debug...
Read more >
Building static HTML failed for path - Developing with Prismic
Hello,. we have an issue with gatsby build . The issue only happens with gatsby build , gatsby develop is working fine. The...
Read more >
[Gatsby] Building static HTML failed for path - Support
There is an error when trying to build the website, the weird thing is that this is only happening in netlify, when I...
Read more >
Debugging HTML Builds | Gatsby
Errors while building static HTML files (the build-time React SSR process) or while using getServerData (the runtime SSR process…
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found