问题
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.
I looked up this
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.
回答1:
The solution is pretty simple, just clear NPM cache
npm cache clear --force
and then, try again
npm install
来源:https://stackoverflow.com/questions/52128347/npm-install-not-working-for-ionic-3-npm-err-code-z-buf-error