Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js FetchError:位于的json响应正文无效https://www.link-here.com/hidden/database.json -意外标记<;在JSON中的位置0_Node.js_Json_Node Fetch - Fatal编程技术网

Node.js FetchError:位于的json响应正文无效https://www.link-here.com/hidden/database.json -意外标记<;在JSON中的位置0

Node.js FetchError:位于的json响应正文无效https://www.link-here.com/hidden/database.json -意外标记<;在JSON中的位置0,node.js,json,node-fetch,Node.js,Json,Node Fetch,我知道这个问题已经被问了很多次了,我在这里搜索了几十个与同一个问题相关的主题,但是没有找到解决方法 我看到一个主题,上面的答案回答说用这个: fetch('https://link-here.com/hidden/database.json') .then(response => response.json()) .then(data => { console.log(data); }); 所以我做了,我仍然收到相同的错误。所以我检查了database.json链接本身,看看这是否

我知道这个问题已经被问了很多次了,我在这里搜索了几十个与同一个问题相关的主题,但是没有找到解决方法

我看到一个主题,上面的答案回答说用这个:

fetch('https://link-here.com/hidden/database.json')
.then(response => response.json())
.then(data => {
console.log(data);
});
所以我做了,我仍然收到相同的错误。所以我检查了database.json链接本身,看看这是否是问题所在。我进入开发者>开发者工具,刷新网站,检查文件是否有
,但它没有。以下是.json文件的响应:

我的应用程序运行良好,没有任何问题。直到我随机收到这个错误。谢谢你的帮助

编辑:我发现这是一个与Cloudflare相关的问题。我从我的网站上删除了Cloudflare,现在工作正常。有人知道为什么Cloudflare是原因吗