简体   繁体   English

在 Zeit 上使用 gatsby-source-buttercms 部署 gatsby 应用程序时出错

[英]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.

相关问题 运行gatsby development时发现预设的“反应”,从而导致gats错误 - error with gatsby finding preset “react” when running gatsby develop Gatsby 节点错误:抛出“必须提供源”错误 - Gatsby-node error: “Must Provide Source” error being thrown gatsby-source-wordpress 错误:“发出 GraphQL 请求时返回了空字符串而不是响应。” - gatsby-source-wordpress error: "An empty string was returned instead of a response when making a GraphQL request." 将 Gatsby JS 站点部署到 Netlify 时出现“错误运行命令:构建脚本返回非零退出代码” - “Error running command: Build script returned non-zero exit code” when deploying Gatsby JS site to Netlify gatsby-source-graphql和GraphQL Shopify Admin API错误 - gatsby-source-graphql and GraphQL Shopify Admin API error 当在 github 上创建 repo 时,Gatsby 开发服务器停止工作。 理智,盖茨比错误 - Gatsby development server stops working when repo is created on github. Sanity, Gatsby Error 当我为 gatsby-starter-gcn 运行 gatsby develop 时,如何修复错误 #10123? - How to fix Error #10123 when I run gatsby develop for gatsby-starter-gcn? Gatsby WordPress来源-GraphQl在不使用时忽略了灵活的内容布局 - Gatsby WordPress Source - Flexible Content layouts ignored by graphql when not used 何时使用反应框架,如Next或Gatsby vs Create React App - When to use a react framework such as Next or Gatsby vs Create React App 使用 gatsby-source-google-spreadsheet 将 Sheets 中的链接插入 Gatsby - Inserting links from Sheets into Gatsby with gatsby-source-google-spreadsheet
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM