Quantcast
Channel: Node.jsタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 8866

next.js heroku デプロイ Error: Couldn't find that app.

$
0
0

next.jsをherokuにデプロイする日本語記事が見当たらなかったため投稿しました。

環境:
node.js
react
next.js

herokuへpushまでは省略します。
push後urlへアクセスすると拒絶されたところから
ログを確認してから出直せと言われたので、

heroku logs -tail
Error: Couldn't find that app.
 ›
 ›   Error ID: not_found

で、結論から
https://github.com/mars/heroku-nextjs
を参考にしました。

package.json
{"name":"next-yaninavi","version":"1.0.0","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\"&& exit 1","dev":"next","build":"next build","start":"next start -p $PORT"},"keywords":[],"author":"","license":"ISC","dependencies":{"next":"^10.0.5","react":"^17.0.1","react-dom":"^17.0.1"}}
npm run build
NODE_EV=production npm run start

heroku触ったことなかったのでビクビクしてたけど、ngrokみたいな感じかな
恐らく、localhostとurlを繋いでるけどそのルート記述が間違ってたのかな。。

理解したら追記します!


Viewing all articles
Browse latest Browse all 8866

Trending Articles