Google Cloud Platform 上托管的 nextjs 应用中缺少“_ssgManifest.js”和 _buildManifest.js

ash*_*rma 5 javascript reactjs google-cloud-platform gcloud next.js

有时控制台在打开网站时会显示这些错误

\n
GET https://example.com/subpath/_next/static/9ufj5kFJf/_buildManifest.js\n[HTTP/3 404 Not Found 311ms]\n\nGET https://example.com/subpath/_next/static/9ufj5kFJf/_ssgManifest.js\n[HTTP/3 404 Not Found 334ms]\n\nLoading failed for the <script> with source \xe2\x80\x9chttps://example.com/subpath/_next/static/9ufj5kFJf/_buildManifest.js\xe2\x80\x9d. 1434-247:1:1\nLoading failed for the <script> with source \xe2\x80\x9chttps://example.com/subpath/_next/static/9ufj5kFJf/_ssgManifest.js\xe2\x80\x9d.\n
Run Code Online (Sandbox Code Playgroud)\n

该应用程序确实使用了 ISR,并且似乎有效,它确实得到了更新,这些文件有什么作用?如果他们失踪了会发生什么?

\n
    \n
  • “反应”:“17.0.2”
  • \n
  • “下一个”:“10.1.3”,
  • \n
  • “节点”“15.1.2”
  • \n
\n

Aki*_*dic 1

我在 Pod 数量 > 1 的 GCP(Kubernetes 引擎)上遇到了同样的问题。我通过重新启动部署(所有 Pod)解决了这个问题。