【发布时间】:2018-09-19 13:18:27
【问题描述】:
当我运行命令npm install npm@latest -g
我收到以下错误:-
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\dk\AppData\Roaming\npm-cache\_logs\2018-04-10T03_25_52_880Z-debug.log
我用谷歌搜索并尝试了很多东西,但没有任何效果。
【问题讨论】:
-
试试
npm i -g npm -
这里讨论了问题和解决方法github.com/npm/npm/issues/19353
-
我已经解决了同样的问题。看到这个链接stackoverflow.com/questions/52467848/…
-
就我而言,
npm cache verify确实有效。 Reference
标签: node.js npm npm-install