Top

Atom,安装 atom-beautify 插件:npm ERR! code Z_BUF_ERROR npm ERR! errno -5 npm ERR! zlib: unexpected end of file

Atom atom  浏览 评论

Atom,安装 atom-beautify 插件:npm ERR! code Z_BUF_ERROR npm ERR! errno -5 npm ERR! zlib: unexpected end of file


Installing “atom-beautify@0.33.4” failed.Hide output…


npm WARN deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

npm ERR! code Z_BUF_ERROR

npm ERR! errno -5

npm ERR! zlib: unexpected end of file


npm ERR! A complete log of this run can be found in:



百度,Google,说是网络原因,下面是解决方法,没试过,不过我换上VPN后,安装成功:


解决办法

1、npm install -g cnpm --registry=https://registry.npm.taobao.org

cnpm安装好之后,如果看官你用的是私有npm库的话还需要重新设置一下镜像。

2、cnpm config set registry=xxxxxxx(你的私有库地址)

那么来吧,安装你的目标模块吧 npm i xxx