[英]Error when deploying the gatsby app with gatsby-source-buttercms on Zeit
My code: https://github.com/who-know-cg/main-gatsby我的代码: https://github.com/who-know-cg/main-gatsby
Every time I build my Gatsby app (on Zeit) I get this error message:每次我(在 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
And I never meet this error when in developing using gatsby develop
.在使用
gatsby develop
进行开发时,我从未遇到过这个错误。
Here is a similar question on github https://github.com/ldd/gatsby-source-github-api/issues/10 .这是关于 github https://github.com/ldd/gatsby-source-github-api/issues/10的类似问题。 But I don't know what the answer means, and I don't know if it's the same issue either.
但我不知道答案是什么意思,也不知道是不是同一个问题。
Please help me find what part is going wrong, thanks you.请帮我看看哪里出了问题,谢谢。
If you haven't gotten an answer yet there is a temporary workaround this issue.如果您还没有得到答案,那么有一个临时解决方法可以解决这个问题。 The github you've linked itself is very helpful.
您自己链接的 github 非常有帮助。
Take the source code and use it as a local plugin.获取源代码并将其用作本地插件。 https://www.gatsbyjs.org/docs/creating-a-local-plugin/
https://www.gatsbyjs.org/docs/creating-a-local-plugin/
Change the mediaType in the source code from application/json
to text/plain
.将源代码中的 mediaType 从
application/json
更改为text/plain
。 This should be a working temporary solution.这应该是一个有效的临时解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.