LoginSignup
5
1

More than 1 year has passed since last update.

Next.js製のアプリをVercelにデプロイしたら404NOT_FOUNDになってしまう

Posted at

事象

Next.js のアプリをVercelにデプロイし、デプロイ先に遷移すると下記のように表示される。
image.png

対応策

Project SettingsのBuild & Development Settingsから、
「FRAMEWORK PRESET」にNext.jsを選択する。

image.png

OUTPUT DIRECTORYの参照先が誤っていたため、404が返却されていました。
Nest.jsのデフォルトアウトプット先(.next?)をプリセットが参照してくれるようになり解決。

(しょうもないことでめっちゃ時間使いました。。)
(同じ事象で時間取られないことを願います。)

5
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
1