Reactjs 从模板中删除图像会导致使用Gatsby找不到文件?

Reactjs 从模板中删除图像会导致使用Gatsby找不到文件?,reactjs,gatsby,gatsby-image,Reactjs,Gatsby,Gatsby Image,当我下载Gatsby并从文件中删除模板图像时,会收到错误消息,服务器无法工作。当我把图像放回去时,它又能工作了。我真的不知道这里发生了什么 为什么不能在没有他们放在那里的图像的情况下使用模板,在删除图像后它似乎完全崩溃了 以下是我收到的错误消息: ERROR #11321 PLUGIN > icon (src/images/gatsby-icon.png) does not exist as defined in gatsby-config.js. > Make sure the

当我下载Gatsby并从文件中删除模板图像时,会收到错误消息,服务器无法工作。当我把图像放回去时,它又能工作了。我真的不知道这里发生了什么

为什么不能在没有他们放在那里的图像的情况下使用模板,在删除图像后它似乎完全崩溃了

以下是我收到的错误消息:

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.

该错误强烈提示您没有删除对图像的所有引用

图标(src/images/gatsby icon.png)不存在,如gatsby-config.js中所定义


gatsby config.js
仍然包含一个引用。您还应该使用IDE文本搜索并查看所有文件(如果它们包含任何引用)。

图像可能仍然是从其他位置链接的,例如
gatsby config
,删除它们,您应该会很高兴的。谢谢!我对反应、学习文件系统和阅读日志非常陌生。谢谢,这个修好了!很高兴我能帮忙!您应该通过单击复选标记接受此答案。这样别人就不会发现这个问题,只会注意到它已经被解决了。
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 | '''