npm cache clear --force报错

问题描述

执行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

请问怎么解决?

阅读 26.6k
1 个回答

进入C:\Users\OK\AppData\Roaming\npm-cache\_cacache目录,手动把index-v5文件夹删除,再次执行 npm cache clear --force

$ npm cache clear --force
npm WARN using --force I sure hope you know what you are doing.

可以了

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题