You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Next.js构建后部署AWS EC2启动数秒后崩溃求助

Next.js公网访问崩溃求助

我已经成功构建了Next.js应用,本地开发环境(localhost)下一切运行正常,但用公网IP访问时,应用启动数秒后就崩溃了,生成了如下堆栈追踪信息。我是Next.js新手,希望有人能帮忙排查崩溃原因,非常感谢。

控制台堆栈追踪截图

TypeError: Cannot read properties of null (reading 'content')
    at main-debe05f3274b8de7.js:1:11764
    at main-debe05f3274b8de7.js:1:12241
    at Array.forEach (<anonymous>)
    at Object.updateHead (main-debe05f3274b8de7.js:1:11612)
    at Object.t [as _pendingUpdate] (main-debe05f3274b8de7.js:1:87363)
    at main-debe05f3274b8de7.js:1:87802
    at Ui (framework-5f4595e5518b5600.js:1:104662)
    at t.unstable_runWithPriority (framework-5f4595e5518b5600.js:1:129336)
    at Ql (framework-5f4595e5518b5600.js:1:44981)
    at Fi (framework-5f4595e5518b5600.js:1:104123)

应用是构建完成后启动的:
启动截图


内容的提问来源于stack exchange,提问作者Guminator

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.03 22:20:46