【问题标题】:Error when deploying the gatsby app with gatsby-source-buttercms on Zeit在 Zeit 上使用 gatsby-source-buttercms 部署 gatsby 应用程序时出错
【发布时间】:2019-10-17 11:34:09
【问题描述】:

我的代码:https://github.com/who-know-cg/main-gatsby

每次我(在 Zeit 上)构建 Gatsby 应用程序时,都会收到以下错误消息:

ERROR #11321  PLUGIN

"gatsby-transformer-json" threw an error while running the onCreateNode lifecycle:

Could not find function loadNodeContent for plugin gatsby-source-buttercms

Error: Could not find function loadNodeContent for plugin gatsby-source-butter  cms

而且我在使用gatsby develop 进行开发时从未遇到过这个错误。

这是 github https://github.com/ldd/gatsby-source-github-api/issues/10 上的一个类似问题。 但我不知道答案是什么意思,也不知道是不是同一个问题。

请帮我找出哪里出了问题,谢谢。

【问题讨论】:

    标签: javascript json reactjs content-management-system gatsby


    【解决方案1】:

    如果您还没有得到答案,有一个临时解决方法可以解决这个问题。您自己链接的 github 非常有帮助。

    获取源代码并将其用作本地插件。 https://www.gatsbyjs.org/docs/creating-a-local-plugin/

    将源代码中的 mediaType 从application/json 更改为text/plain。这应该是一个可行的临时解决方案。

    【讨论】:

      【解决方案2】:

      这对我有用

      npm install Pearce-Ropion/gatsby-source-apiserver#6112115 -D 纱线添加 Pearce-Ropion/gatsby-source-apiserver#6112115 -D

      【讨论】:

        猜你喜欢
        • 2019-12-10
        • 2021-09-23
        • 2019-11-22
        • 2020-03-07
        • 2019-01-02
        • 1970-01-01
        • 2020-03-20
        • 2020-06-27
        • 2020-05-25
        相关资源
        最近更新 更多