请运行`npm cache clean` [英] Please run `npm cache clean`
问题描述
我正在尝试从 这里npm install ipfs - 安装 IPFS --save
它给我的错误是
I'm trying to install IPFS from herenpm install ipfs --save
and it is giving me the error as
npm 错误!tar.unpack 读取错误/media/FLASH/Tech/IPFS/ipfs
npm ERR! tar.unpack error reading /media/FLASH/Tech/IPFS/ipfs
npm 错误!addLocal 无法安装/media/FLASH/Tech/IPFS/ipfs
npm ERR! addLocal Could not install /media/FLASH/Tech/IPFS/ipfs
npm 错误!Linux 4.15.0-29-generic
npm ERR! Linux 4.15.0-29-generic
npm 错误!argv "/usr/local/bin/node" "/usr/local/bin/npm" "安装" "ipfs""--保存"
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "ipfs" "--save"
npm 错误!节点 v6.9.2
npm ERR! node v6.9.2
npm 错误!npm v3.10.9
npm ERR! npm v3.10.9
npm 错误!0 字节压缩包
npm ERR! 0-byte tarball
npm 错误!请运行 npm cache clean
npm ERR! Please run npm cache clean
我尝试执行 npm cache clean
但在执行 npm install ipfs --save
时仍然给我同样的错误
I tried doing npm cache clean
but still it is giving me the same error while doing npm install ipfs --save
我不知道为什么会出现此错误.以及如何避免这个错误.
I don't know why I'm getting this error. and how to avoid this error.
推荐答案
从 npm@5
开始,npm 缓存会从损坏问题中自我修复,并且保证从缓存中提取的数据是有效的.如果您想确保一切都一致,请改用 npm cache verify
.另一方面,如果您正在调试安装程序的问题,您可以使用 npm install --cache/tmp/empty-cache
来使用临时缓存而不是破坏实际缓存.
As of npm@5
, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use npm cache verify
instead. On the other hand, if you're debugging an issue with the installer, you can use npm install --cache /tmp/empty-cache
to use a temporary cache instead of nuking the actual one.
如果您确定要删除整个缓存,请重新运行:
If you're sure you want to delete the entire cache, rerun:
npm cache clean --force
可以在 /Users/USERNAME/.npm/_logs/2019-01-08T21_29_30_811Z-debug.log
中找到此运行的完整日志.
A complete log of this run can be found in /Users/USERNAME/.npm/_logs/2019-01-08T21_29_30_811Z-debug.log
.
这篇关于请运行`npm cache clean`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!