0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[React Next.js] Consoleに[Fast Refresh] rebuildingが表示されたままコンテナが落ちる問題

Posted at

環境

Dockerで

  • Next.js & GraphQL
  • Rails
  • MySQL DB
    のDevServerを立てていて
    VSCodeのRemoteContainerでComponentを編集している状態

問題

ブラウザでページを表示(こちらは大丈夫)
Reactのファイルを編集し、ブラウザが自動的にfast refreshを始める
そしてそのままエラーでコンテナが落ちる
以下がそのエラー

コンテナのログ
client_1 | wait - compiling...
client_1 | Killed
client_1 | error Command failed with exit code 137.
client_1 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

解決策

error 137 はメモリ不足のエラーなのでコンテナの割り当てメモリを増やせばOK
MacのDockerであれば右上の歯車→Resources→ADVANCEDで設定できる

最後に

エラーコードはちゃんと読みましょう(戒め)

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?