问题描述
执行npm cache clear --force报错
$ npm cache clear --force
npm WARN using --force I sure hope you know what you are doing.
npm ERR! path C:\Users\OK\AppData\Roaming\npm-cache\_cacache\index-v5\70\a4
npm ERR! code ENOTEMPTY
npm ERR! errno -4051
npm ERR! syscall rmdir
npm ERR! ENOTEMPTY: directory not empty, rmdir 'C:\Users\OK\AppData\Roaming\npm-cache_cacacheindex-v570a4'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\OK\AppData\Roamingnpm-cache\_logs\2019-07-30T09_01_59_318Z-debug.log
请问怎么解决?
进入C:\Users\OK\AppData\Roaming\npm-cache\_cacache目录,手动把index-v5文件夹删除,再次执行 npm cache clear --force
可以了