Gatsby 盖茨比开发成功,但构建失败,出现graphQL警告

Gatsby 盖茨比开发成功,但构建失败,出现graphQL警告,gatsby,Gatsby,我是盖茨比的新手,所以我可能做错了什么 我开始使用盖茨比起动器,我做了一些修改。由于一切进展顺利,我决定试着建造一个。。。结果失败了 错误表示无法读取属性,因为该属性为null。更深入地看,我认为错误的真正原因是以下警告: warn The GraphQL query in the non-page component Exported queries are only executed for Page components. It's possible you're trying t

我是盖茨比的新手,所以我可能做错了什么

我开始使用盖茨比起动器,我做了一些修改。由于一切进展顺利,我决定试着建造一个。。。结果失败了

错误表示无法读取属性,因为该属性为null。更深入地看,我认为错误的真正原因是以下警告:

    warn The GraphQL query in the non-page component
Exported queries are only executed for Page components. It's possible you're
trying to create pages in your gatsby-node.js and that's failing for some
reason.

If the failing component(s) is a regular component and not intended to be a page
component, you generally want to use a <StaticQuery> (https://gatsbyjs.org/docs/static-query)
instead of exporting a page query.

If you're more experienced with GraphQL, you can also export GraphQL
fragments from components and compose the fragments in the Page component
query and pass data down into the child component — http://graphql.org/learn/queries/#fragments
警告非页面组件中的GraphQL查询
导出的查询仅对页面组件执行。有可能你是
试图在您的gatsby-node.js中创建页面,但这在某些情况下是失败的
原因。
如果出现故障的组件是常规组件,而不是页面
组件,您通常希望使用(https://gatsbyjs.org/docs/static-query)
而不是导出页面查询。
如果您对GraphQL更有经验,还可以导出GraphQL
来自组件的片段,并在页面组件中组成片段
查询并将数据向下传递到子组件-http://graphql.org/learn/queries/#fragments
我确保对非页面组件使用StaticQuery。而且,当我使用盖茨比开发而不是构建时,我没有得到警告或错误

我不知道现在该怎么办。 任何建议都很好