graphql - Gatsby develop failed: Fetching SilverStripe data failed Cannot read property 'data' of undefined after setting up silverstripe-gatsby
问题描述
I am new to gatsby and was trying to test out Gatsby with Silverstripe. If it goes well, it may be great solution to one of our work project.
I have a test silverstripe site working along which I install from the instruction available here: https://github.com/unclecheese/gatsby-starter-silverstripe
With the instructions, My SS4.5 site is working fine as well as the endpoint /__gatsby/graphql as I am able to add query to the endpoint.
As I tried to run "gatsby develop" as per instruction, the following errors appear and my site was not built..:
my host url is also configured in the config.js.
FetchError: invalid json response body at http://localhost/gatsbyv3/__gatsby/graphql reason: Unexpected token < in JSON at position 0
ERROR
Fetching SilverStripe data failed Cannot read property 'data' of undefined TypeError: Cannot read property 'data' of undefined
I'm not sure if I've missed anything and have not edited the config file. Any help or advice would be much appreciated. Thank you in advance.
解决方案
推荐阅读
- postgresql - 在 Redshift 中将 varchar 列转换为整数
- intellij-idea - 当列中有一些注释时对齐列中的字段
- python - 使用递归以相反的顺序返回节点类的字符串表示形式
- android - 在 SQLite 中存储和查询纬度和对数不会产生预期的结果
- c++ - 预编译的头文件 C++ 不能重命名 pch.h
- excel - 仅格式化小写字母
- groovy - 如何在 Katalon 中使用脚本模式加密密码文本输入?
- ruby-on-rails - 在 before_save 之前触发 before_create
- javascript - 在发出进一步的 ajax 请求之前等待令牌
- android - 单击列表项时未出现Android片段