0
0

More than 3 years have passed since last update.

Gatsbyで「hot-update.json timed out.」に出会った

Last updated at Posted at 2021-02-07

環境

node : 12.19.0
npm : 6.14.8
Gatsby CLI version: 2.12.111
Gatsby version: 2.24.83
テンプレート:gatsby-starter-hello-world

エラー内容

$ npm run develop

で起動すると以下のエラーが発生する。

Unhandled Rejection (Error): Manifest request to /xxxx.hot-update.json timed out.
XMLHttpRequest.request.onreadystatechange

-要約-
Manifestへのリクエストがタイムアウトになり、ホットリロードできない。

解決方法

package.jsonの以下の部分を書き換えた。

[変更前]
"develop": "gatsby develop"
[変更後]
"develop": "gatsby develop -p 8080"

今回は8080番にしたが空いている任意のポート番号で良さそうです。

原因

~/gatsby-starter-hello-world/webpack/bootstrap:41


  38 | if (request.status === 0) {
  39 |  // timeout
  40 |  reject(
> 41 |      new Error("Manifest request to " + requestPath + " timed out.")
  42 | ^);
  43 | } else if (request.status === 404) {
  44 |  // no update available

bootstrapがなんか言ってることは分かるんですが理解できていません。
分かる方がいればリンクでもいいのでコメントお願いいたします。

参考

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