Reputation: 5566
I am installing angular material here is what I have done
Angular material successfull installed by the following command
1.npm install --save @angular/material
Angula CDK fail to install by using the following command
1.npm install --save @angular/cdk
I get the following error in cmd:
npm WARN tar zlib error: unexpected end of file
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Bonge\AppData\Roaming\npm-cache\_logs\2018-07-25T17_44_24_771Z-debug.log
Fo reference I never had this problem, this happend after I uninstalled the cdk and angular material so now I am trying to install it again ,
what do I need to do to solve this problem?
Upvotes: 8
Views: 31547
Reputation: 11911
Since NPM 6 you can do clean install.
npm clean-install
That would try to remove the node modules folder and safely install the packages by checking the package-lock.json.
P.S. If that fails for some reason, check here for troubleshooting.
Upvotes: 1
Reputation: 892
I faced same issue. (cb() never called!). In my case folder has not read/write permission. Check your folder permission assign read/write permission to fix the issue.
Upvotes: 0
Reputation: 126
In my case problem is due to space not enough in the disk. So I cleaned up some space. Problem get solved.
Upvotes: 0
Reputation: 51
The best way to resolve is update the npm version and install again.
npm install -g npm
Upvotes: 5
Reputation: 34004
I had the same issue and I installed it by excluding package-lock.json using below command
npm i --save @angular/cdk --no-package-lock
OR manually deleting package-lock.json
Upvotes: 1
Reputation: 5566
After googling here is the solution i found
npm cache clean --force
Upvotes: 17