⚠️

Amplify x Nuxt3で静的サイトをホスティングした時、CustomerErrorでデプロイが失敗する

に公開

背景

Amplify x Nuxt3ですでにデプロイしていたサイトがあった。
2025/03/25では正常にデプロイできていたが、2025/05/12にデプロイした時、謎に失敗した。

エラー

[ERROR]: !!! CustomerError: Failed to find the deploy-manifest.json file in the build output.
Please verify that it exists within the "baseDirectory" specified in your buildSpec.
If it's not there, we will also check the .amplify-hosting directory as a fallback.
When using a framework adapter for hosting on Amplify, double-check that the adapter settings are correct.

解決策

上記のエラーはSSRのためには、deploy-manifest.jsonが必要、というもの。
しかし今回はSSGなので、このファイルは不要のはず。

そこで、Amplifyのconsoleから
アプリ -> アプリケーションの設定 -> 全般設定
の「プラットフォーム」を確認すると、WEB_COMPUTEとなっていた。

作成時自分がこの設定にしたかどうかは覚えていないが、こちらの設定を変更するために

aws amplify update-app \
  --app-id <YOUR_APP_ID> \
  --platform WEB \
  --region ap-northeast-1

をcliから実行し、無事デプロイが成功した。

ちなみに、この設定は投稿現在(2025/05/12)UIからは変更できない。
直近で何かアップデートでもあったのだろうか。

追記

Stack overflowにも同じQuestionが上がっていた。
どうやら、AWS側が自動でSSRアプリだと判定することがあるらしい・・・
https://stackoverflow.com/questions/78278760/aws-amplify-nuxt-3-deploy

Discussion