Npm install not working

hello,

I have issues for days now… i try to create an ionic v3 app and everytime it stops at lin 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://bit.ly/ionic-dev-app <–

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

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.

Please help out…thanks

Your problem is probably with npm, something to do with permissions and files. This happens quite often and is almost impossible to successfully debug (at least here in the forum).

One solution: Uninstall your node, install nvm (or nvm-windows if you are on Windows), install a new node (which includes npm) with this, then install ionic and cordova again and try your command again. The problem should be gone.

Please run npm cache clear --force and try again.

3 Likes

Thank you for the solution, it works!