carbon-design-system / gatsby-theme-carbon

A Carbon inspired Gatsby theme
https://gatsby.carbondesignsystem.com/
Apache License 2.0
360 stars 275 forks source link

"gatsby build" doesn't create public/index.html #1265

Closed billalive closed 2 years ago

billalive commented 2 years ago

Detailed description

After creating a site with this theme, gatsby develop works fine, and gatsby build runs without error, but there does not seem to be any public/index.html. Without an index.html, how can I publish my site?

What did you expect to happen? What happened instead? What would you like to see changed?

I expected gatsby build to create public/index.html.

Instead, public/ has many files and directories, including render-page.js and render-page.js.map, but no index.html.

Steps to reproduce the issue

  1. gatsby new mysite "https://github.com/carbon-design-system/gatsby-starter-carbon-theme"
  2. cd mysite/
  3. gatsby build
  4. public/index.html does not exist.

Additional information

The closest GitHub issues I could find were https://github.com/gatsbyjs/gatsby/issues/21843 and https://github.com/gatsbyjs/gatsby/issues/31795, but neither of them propose a concrete solution that seems to work with this starter.

Gatsby usually expects an index.js, but this starter uses index.mdx instead. Could there be a problem there? Is there some additional configuration needed here?

Thank you!

billalive commented 2 years ago

So... this is embarrassing.

Turns out, I was not actually running gatsby build, but make build, a Makefile command that I assumed I had set up properly to run gatsby build properly in my custom Docker. Alas, make build was doing something else entirely. :blush:

I have now finally run gatsby build properly, and all is well. Hope this didn't waste anyone's time.