3

When I download Gatsby and remove the template images from the file, I get error messages, and the server does not work. When I throw the images back in it works again. I really have no idea what is going on here.

Why can't use the template without the images they put in there, it seems to totally break after removing the images.

These are error messages I get:

ERROR #11321  PLUGIN
> 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.
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 | '''
jww
  • 97,681
  • 90
  • 411
  • 885
cyberAnn
  • 411
  • 1
  • 7
  • 16
  • 2
    The image is probably still linked from some other places, like `gatsby-config`, remove them and you should be fine – Agney Nov 27 '19 at 03:51

1 Answers1

1

The error strongly hints that you did not remove ALL the references to the image.

icon (src/images/gatsby-icon.png) does not exist as defined in gatsby-config.js.

gatsby-config.js still hoilds a reference. You should also use your IDE text search and look through all the files if they contain any references.

EliteRaceElephant
  • 7,744
  • 4
  • 47
  • 62
  • thanks! I am very new to react and learning the file system and reading logs. thank you, this fixed it! – cyberAnn Dec 11 '19 at 20:28
  • Glad I could help! You should accept this as an answer by clicking the checkmark. This way others won't find this question only to notice that it was solved already. – EliteRaceElephant Dec 12 '19 at 07:37