Npm安装不适用于ionic 3,npm ERR!代码Z_BUF_ERROR [英] Npm install not working for ionic 3, npm ERR! code Z_BUF_ERROR

查看:104
本文介绍了Npm安装不适用于ionic 3,npm ERR!代码Z_BUF_ERROR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几天的问题了.现在,我尝试创建一个ionic v3应用程序,每次它停止在下面的行中.

I have issues for days. Now i try to create an ionic v3 app and every time it stops at line below.

√ Preparing directory .\firstProject - done!
√ Downloading and extracting blank starter - done!
? Integrate your new app with Cordova to target native iOS and Android? Yes

ionic integrations enable cordova --quiet
[INFO] Downloading integration cordova
[INFO] Copying integrations files to project
[OK] Integration cordova added!

Installing dependencies may take several minutes.

 *   IONIC  DEVAPP   *
Speed up development with the Ionic DevApp, our fast, on-device testing mobile app

Test on iOS and Android without Native SDKs
LiveReload for instant style and JS updates
–> Install DevApp: https://ionicframework.com/docs/pro/devapp/ <–

────────────────────────────────────────────────────────────

npm i
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated hoek@2.16.3: The major version is no longer supported. Please update to 4.x or newer
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:
npm ERR! C:\Users\Admin\AppData\Roaming\npm-cache_logs\2018-09-01T04_12_23_741Z-debug.log
[ERROR] Non-zero exit from subprocess.

我抬起头来

不推荐使用的browserslist@2.11.3:Browserslist 2在读取时可能失败 Browserslist>其他工具中使用的> 3.0配置

deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools

但找不到任何有效的方法.

but couldn't find anything that works.

推荐答案

解决方案非常简单,只需清除NPM缓存

The solution is pretty simple, just clear NPM cache

npm cache clear --force

然后重试

npm install

这篇关于Npm安装不适用于ionic 3,npm ERR!代码Z_BUF_ERROR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆