简体   繁体   English

将 Gatsby + Contentful 网站部署到 Netlify

[英]Deploy Gatsby + Contentful website to Netlify

I've built simple blog website using Gatsby and Contentful CMS.我使用 Gatsby 和 Contentful CMS 构建了简单的博客网站。 Now I am gonna deploy it to Netlify but met a build error.现在我要将它部署到 Netlify,但遇到构建错误。

在此处输入图片说明

在此处输入图片说明

I encountered such an error before.我以前遇到过这样的错误。 It is because I didn't add environment variables into Netlify settings.这是因为我没有在 Netlify 设置中添加环境变量。 You may have env values in your project such as contentful spaceId, access token, etc. Please check it again if you added it or not.您的项目中可能有 env 值,例如 contentful spaceId、访问令牌等。请再次检查是否添加了它。

Go to Netlify settings -> Build & deploy -> Environment section转到 Netlify 设置 -> 构建和部署 -> 环境部分

环境变量

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM