如何删除node_modules-Windows中的深度嵌套文件夹 [英] How to Delete node_modules - Deep Nested Folder in Windows
问题描述
尝试删除由npm install
创建的 node_modules 目录时:
Upon trying to remove the node_modules directory created by npm install
:
源文件名大于文件所支持的名称 系统.尝试移至路径名较短的位置,或尝试 尝试执行此操作之前,请重命名为短名称
The source file name(s) are larger than is supported by the file system. Try moving to a location which has a shorter path name, or try renaming to shorter name(s) before attempting this operation
我还尝试了 shift + delete ,但仍然遇到相同的问题.
I also tried shift + delete and still having the same issue.
推荐答案
由于这是Google的最佳搜索结果,因此这对我有用:
Since this the top google result, this is what worked for me:
安装RimRaf:
npm install rimraf -g
在项目文件夹中,使用以下命令删除node_modules文件夹:
And in the project folder delete the node_modules folder with:
rimraf node_modules
如果您要递归删除:
rimraf .\**\node_modules
[ http: //www.nikola-breznjak.com/blog/nodejs/how-to-delete-node_modules-folder-on-windows-machine/]
这篇关于如何删除node_modules-Windows中的深度嵌套文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!