Gatsby React - Having issues running server

Hello I am using Gatsby JS, when I remove the template icon and image, I get error messages. When I throw the images back in, everything works. How can i remove simple things I dont need like an image or icon with out getting error messages? Can some please help decode what is going on here? Or help me understand what the messages mean? I’ve googled and tried multple things… nothing works. Thx.

Error messages below in my terminal:

success open and validate gatsby-configs - 0.022s
success load plugins - 0.323s
success onPreInit - 0.003s
success initialize cache - 0.009s
success copy gatsby files - 0.038s
success onPreBootstrap - 0.009s
success createSchemaCustomization - 0.005s
success source and transform nodes - 0.085s
success building schema - 0.261s
success createPages - 0.002s
success createPagesStatefully - 0.067s
success onPreExtractQueries - 0.004s
success update schema - 0.035s
success extract queries from components - 0.284s
success write out requires - 0.029s
success write out redirect data - 0.002s

ERROR #11321 PLUGIN

“gatsby-plugin-manifest” threw an error while running the onPostBootstrap lifecycle:

icon (src/images/gatsby-icon.png) does not exist as defined in gatsby-config.js. Make sure the file exists relative to the root of the site.

success onPostBootstrap - 0.035s

info bootstrap finished - 3.738 s

success run queries - 0.060s - 7/7 115.71/s

ERROR

There was an error compiling the html.js component for the development server.

See our docs page on debugging HTML builds for help https://gatsby.dev/debug-html ENOENT: no such file or directory, open ‘src/images/gatsby-icon.png’

38 |
39 | if (cacheBusting !== “none”) {

40 | iconDigest = (0, _gatsbyCoreUtils.createContentDigest)(_fs[“default”].readFileSync(pluginOptions.icon));
| ^
41 | }
42 |
43 | var insertFaviconLinkTag = typeof pluginOptions.include_favicon !== “undefined” ? pluginOptions.include_favicon : true;

WebpackError: ENOENT: no such file or directory, open ‘src/images/gat sby-icon.png’

  • gatsby-ssr.js:40 Object…/node_modules/gatsby-plugin-manifest/gatsb y-ssr.js.exports.onRenderBody
    node_modules/gatsby-plugin-manifest/gatsby-ssr.js:40:77

not finished Build manifest and related icons - 1.050s

Did you look in the gatsby-config.js file for where the image is used?

1 Like

Thank you! This is the first time I am setting up Gatsby and React… I am still pretty new to both… and learning to read error messages and both files structures… thank you this fixed the issue… i might be back to ask you more! I hope you don’t mind!

No problem happy to help. Ask away, just know I’m no expert in Gatsby so I may or may not be able to help. But I’m sure somebody can.

07%20PM

why is my public folder dark? I keep getting error messages that icon logos are missing and they are in this folder, however, the folder is dark… what does this mean?

As for the folder color, I can’t be sure but has the public folder been git ignored maybe?

I assume the public folder is a build output. Are you getting the errors about the missing icons when building?

Without seeing your code it is really hard to say much. Can you make a git repo with your code?

1 Like

i finally fixed it!!! :slight_smile: Thanks!