【问题标题】:"_ssgManifest.js" & _buildManifest.js missing from a nextjs app hosted on Google Cloud Platform托管在 Google Cloud Platform 上的 nextjs 应用缺少“_ssgManifest.js”和 _buildManifest.js
【发布时间】:2022-04-06 03:41:13
【问题描述】:

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

GET https://example.com/subpath/_next/static/9ufj5kFJf/_buildManifest.js
[HTTP/3 404 Not Found 311ms]

GET https://example.com/subpath/_next/static/9ufj5kFJf/_ssgManifest.js
[HTTP/3 404 Not Found 334ms]

Loading failed for the <script> with source “https://example.com/subpath/_next/static/9ufj5kFJf/_buildManifest.js”. 1434-247:1:1
Loading failed for the <script> with source “https://example.com/subpath/_next/static/9ufj5kFJf/_ssgManifest.js”.

该应用确实使用了 ISR,而且似乎可以正常工作,它确实得到了更新,这些文件有什么作用?如果他们不见了会发生什么?

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

【问题讨论】:

  • 我认为this github issue 可能会对您有所帮助。您还提到您已将应用程序托管在 gcloud 上。您能否添加更多详细信息,例如您使用 Google Cloud Platform 中的哪个基础架构(Google App Engine/Google Kubernetes Engine/Google Compute Engine 或其他任何东西)来托管 Next.js 应用程序以及您遵循的任何特定文档?

标签: javascript reactjs google-cloud-platform next.js gcloud


【解决方案1】:

我在使用 GCP(Kubernetes 引擎)时遇到了同样的问题,其中 pod 数 > 1。我通过重新启动部署(所有 pod)解决了这个问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-11-05
    • 2022-11-19
    • 2020-08-05
    • 1970-01-01
    • 1970-01-01
    • 2023-01-25
    • 2020-08-22
    • 1970-01-01
    相关资源
    最近更新 更多