最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】Vue调试出错:GET localhost __webpack_hmr net ERR_INCOMPLETE_CHUNKED_ENCODING

Vue crifan 5713浏览 0评论

用Vue的admin的模板:

https://github.com/PanJiaChen/vueAdmin-template/tree/permission-control

去调试Vue期间,经常看到console出错:

GET http://localhost:3050/__webpack_hmr net::ERR_INCOMPLETE_CHUNKED_ENCODING

大概现象就是:

刚开始启动调试时是正常的,过了几十秒后,就会报错:

GET localhost webpack_hmr net::ERR_INCOMPLETE_CHUNKED_ENCODING

vue GET localhost __webpack_hmr net ERR_INCOMPLETE_CHUNKED_ENCODING

Should handle when app server is reloaded via nodemon · Issue #21 · glenjamin/webpack-hot-middleware

net::ERR_INCOMPLETE_CHUNKED_ENCODING in node v8.0 + chrome 58.0.3029.110 · Issue #210 · glenjamin/webpack-hot-middleware

说是升级node到8.1.1就可以了?

去试试

参考自己的:

【已解决】create-react-app创建项目时提示:You are using Node v4.4.7 so the project will be boostrapped with an old unsupported version of tools

去升级:

➜  HeadquarterReport git:(permission-control) ✗ node -v
v8.0.0
➜  HeadquarterReport git:(permission-control) ✗ sudo npm cache clean -f
Password:
Sorry, try again.
Password:
npm WARN using –force I sure hope you know what you are doing.
➜  HeadquarterReport git:(permission-control) ✗ sudo npm install -g n
/usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n
/usr/local/lib
➜  HeadquarterReport git:(permission-control) ✗ sudo n stable
     install : node-v9.0.0
       mkdir : /usr/local/n/versions/node/9.0.0
######################################################################## 100.0%
   installed : v9.0.0
➜  HeadquarterReport git:(permission-control) ✗ node -v
v9.0.0

然后再去看看此问题是否解决。

结果出现另外错误:

【已解决】vue运行出错:Module build failed Error Node Sass does not yet support your current environment OS X 64-bit with Unsupported runtime 59

然后就解决了问题了。

再过很长时间,也没有出现上述问题了:

【总结】

此处,vue中调试,在console中报错:

GET localhost __webpack_hmr net ERR_INCOMPLETE_CHUNKED_ENCODING

原因是:

当前用的node是8.0.0有bug,升级到8.1.1即可。

而此处直接用:

node -v
sudo npm cache clean -f
sudo n stable
node -v

而升级到了最新版本的9.0.0的node,也同样解决了问题。

转载请注明:在路上 » 【已解决】Vue调试出错:GET localhost __webpack_hmr net ERR_INCOMPLETE_CHUNKED_ENCODING

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
85 queries in 0.170 seconds, using 22.07MB memory