Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.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
无法使用Netlify、Stapi和Graphql部署_Graphql_Nuxt.js_Backend_Netlify_Strapi - Fatal编程技术网

无法使用Netlify、Stapi和Graphql部署

无法使用Netlify、Stapi和Graphql部署,graphql,nuxt.js,backend,netlify,strapi,Graphql,Nuxt.js,Backend,Netlify,Strapi,我正在用Nuxt、graphql和strapi创建一个网站。 在本地使用,效果很好。然后我用mlab插件在heuroku部署后端,而且一切都很好。 使用heuroku链接转到netlify并在那里部署它(遵循教程)。它说部署成功,但当我打开页面时,它说找不到页面。我查看了部署日志,发现一个错误: Error: Network error: request to http://localhost:1337/graphql failed, reason: connect ECONNREFUSED 1

我正在用Nuxt、graphql和strapi创建一个网站。 在本地使用,效果很好。然后我用mlab插件在heuroku部署后端,而且一切都很好。 使用heuroku链接转到netlify并在那里部署它(遵循教程)。它说部署成功,但当我打开页面时,它说找不到页面。我查看了部署日志,发现一个错误:

Error: Network error: request to http://localhost:1337/graphql failed, reason: connect ECONNREFUSED 127.0.0.1:1337
10:16:00 AM:     at new ApolloError (/opt/build/repo/node_modules/apollo-client/bundle.umd.js:92:26)
10:16:00 AM:     at /opt/build/repo/node_modules/apollo-client/bundle.umd.js:1588:34
10:16:00 AM:     at /opt/build/repo/node_modules/apollo-client/bundle.umd.js:2008:15
10:16:00 AM:     at Set.forEach (<anonymous>)
10:16:00 AM:     at /opt/build/repo/node_modules/apollo-client/bundle.umd.js:2006:26
10:16:00 AM:     at Map.forEach (<anonymous>)
10:16:00 AM:     at QueryManager.broadcastQueries (/opt/build/repo/node_modules/apollo-client/bundle.umd.js:2004:20)
10:16:00 AM:     at /opt/build/repo/node_modules/apollo-client/bundle.umd.js:1483:29
10:16:00 AM:     at processTicksAndRejections (internal/process/task_queues.js:97:5)

错误:网络错误:请求http://localhost:1337/graphql 失败,原因:connect ECONREFUSSED 127.0.0.1:1337
上午10:16:00:at new apollo出错(/opt/build/repo/node_modules/apollo client/bundle.umd.js:92:26)
上午10:16:00:at/opt/build/repo/node_modules/apollo client/bundle.umd.js:1588:34
上午10:16:00:at/opt/build/repo/node_modules/apollo client/bundle.umd.js:2008:15
上午10:16:00:at Set.forEach()
上午10:16:00:at/opt/build/repo/node_modules/apollo client/bundle.umd.js:2006:26
上午10:16:00:at Map.forEach()
上午10:16:00:00:QueryManager.broadcastQueries(/opt/build/repo/node_modules/apollo client/bundle.umd.js:2004:20)
上午10:16:00:at/opt/build/repo/node_modules/apollo client/bundle.umd.js:1483:29
上午10:16:00:at ProcessTicks和Rejections(internal/process/task_queues.js:97:5)
你知道怎么解决这个问题吗?我搜索了一下,但找不到任何对我有帮助的答案。
谢谢

它应该引用Heroku url。您需要为Heroku更改database.js

将graphql URL更改为heroku子域。我是如何做到的?你是说用heroku域名加:?