【发布时间】:2020-12-06 14:28:56
【问题描述】:
我的 Next.js 应用部署目前遇到问题。在遵循 netlify 博客中关于如何使用 netlify for Next.js 创建服务器端呈现应用程序的指南后,我能够成功构建,但我的网站似乎无法正常工作。
该网站目前位于https://sleepy-murdock-8d5427.netlify.app/。错误信息将粘贴在下方。
{
"errorType": "Runtime.UnhandledPromiseRejection",
"errorMessage": "FetchError: request to http://localhost:3000/api/notes failed, reason: connect ECONNREFUSED 127.0.0.1:3000",
"trace": [
"Runtime.UnhandledPromiseRejection: FetchError: request to http://localhost:3000/api/notes failed, reason: connect ECONNREFUSED 127.0.0.1:3000",
" at process.<anonymous> (/var/runtime/index.js:35:15)",
" at process.emit (events.js:315:20)",
" at processPromiseRejections (internal/process/promises.js:209:33)",
" at processTicksAndRejections (internal/process/task_queues.js:98:32)"
]
}
【问题讨论】:
-
Netlify 不支持服务器端渲染的 next.js 应用。您遵循了哪个指南?
标签: next.js netlify netlify-function