【发布时间】:2018-04-22 21:51:13
【问题描述】:
我在这里遇到了一个奇怪的问题,因此我删除了 C 驱动器上的大部分 npm 软件包,因为我将它们全部移动到我的外部硬盘驱动器上。我决定这样做是因为我意识到无论何时我要全局安装一个包,即使我更改了前缀,它也会始终将它安装在我的 C 驱动器上。
无论如何,在设置我的前缀并删除我的 C 驱动器上与 npm 相关的所有文件之后,我仍然有超过 100 gig 的数据应该可用。
为什么 npm 获取了这么多数据?仅我的节目就只有几场演出。
所以我很困惑为什么。我有 Windows 8。
编辑
C:\Users\Niloy>npm cache clean
npm ERR! 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.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this
command with --force.
npm ERR! A complete log of this run can be found in:
npm ERR! H:\node.js\npm-cache\_logs\2017-11-09T19_16_27_483Z-debug.log
也使用
npm cache verify
C:\Users\Niloy>npm cache verify
Cache verified and compressed (H:\node.js\npm-cache\_cacache):
Content verified: 0 (0 bytes)
Index entries: 0
Finished in 0.516s
【问题讨论】:
-
像TreeSize 这样的实用程序有帮助吗?
-
我没有,但我设法通过在他们的文件资源管理器上放置一些窗口代码来找到我最大的文件,结果证明这根本不是 npm 问题,我认为这是因为我前一天使用它,但它是 Windows 8.1 安装(最近重新启动了我的笔记本电脑。)非常感谢您提供的信息。