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