开发环境中浏览器控制台频繁出现 ERR_CONTENT_LENGTH_MISMATCH 错误

我在开发环境中经常遇到这些错误:

discourse-reactions_main.Q5vqJe-h8ro1ilp.digested.js:1  Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
chunk-jiiahumh.digested.js:1  Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
chunk-mkia0op3.digested.js:1  Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH

或者:

GET http://localhost:3000/assets/js/plugins/chat_main.DXNPoW-htkfwtbk.digested.js net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)
(index):90  GET http://localhost:3000/assets/js/plugins/discourse-ai_admin.DncC-f-mtqe97w7.digested.js net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)
(index):541  GET http://localhost:3000/stylesheets/admin_c962958770e1245d5bb1026e1e40f1ef3ef611f6.css?__ws=localhost net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK)
(index):545  GET http://localhost:3000/stylesheets/chat_c962958770e1245d5bb1026e1e40f1ef3ef611f6.css?__ws=localhost net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK)
color_definitions_dark_13_-1_2507ff89a2ca761acdb701533aca3014e900a7a0.css?__ws=localhost:1  GET http://localhost:3000/fonts/InterVariable.woff2?v=0.0.19 net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)
(index):126  GET http://localhost:3000/assets/js/plugins/discourse-reactions_main.Q5vqJe-h8ro1ilp.digested.js net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)

完全不知道原因。页面也经常加载不出来。通常需要重新加载 2-3 次,还得有点运气才能加载成功。配合 discourse_theme gem 使用时非常令人沮丧,因为更新会触发标签页重新加载,可能导致页面永远处于加载状态。

不过,当页面_确实_加载成功时,这些错误最初并不会出现,但在正常的日志输出之后会出现:

这似乎也与以下问题有关:

与链接中的主题一样,我的环境是在 WSL2 (Ubuntu) 上使用 Dev Containers。