如何删除 node_modules - Windows 中的深层嵌套文件夹 [英] How to Delete node_modules - Deep Nested Folder in Windows

查看:26
本文介绍了如何删除 node_modules - 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:

更新,如果你有 npm v5,使用 npx:

Update, if you have npm v5, use npx:

npx rimraf ./**/node_modules

否则安装 RimRaf:

Otherwise install RimRaf:

npm install rimraf -g

并在项目文件夹中删除 node_modules 文件夹:

And in the project folder delete the node_modules folder with:

rimraf node_modules

如果要递归删除:

rimraf .** ode_modules

rimraf .** ode_modules

[ http://www.nikola-breznjak.com/blog/nodejs/how-to-delete-node_modules-folder-on-windows-machine/ ]

这篇关于如何删除 node_modules - Windows 中的深层嵌套文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆