node.js - 如何删除 node_modules - Windows 中的深层嵌套文件夹

标签 node.js windows-7 npm

在尝试删除 npm install 创建的 node_modules 目录时:

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 仍然有同样的问题。

最佳答案

由于这是谷歌搜索结果中的佼佼者,这对我有用:

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

npx rimraf ./**/node_modules

否则安装 RimRaf:

npm install rimraf -g

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

rimraf Node 模块

如果要递归删除:

rimraf .\**\node_modules

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

关于node.js - 如何删除 node_modules - Windows 中的深层嵌套文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28175200/

相关文章:

node.js - 在 Node.js 中,如何将 bluebird Promise 与 for 循环一起使用

javascript - Firebase 管理 SDK 无法在 Cloud Scheduler (PubSub) 上运行

java - 具有 Windows7 外观和感觉的 JFileChooser 缺少按钮

git - 如何更新 npm 模块,忽略 git repo

git - 如何使用NPM 安装特定的Git 分支?

javascript - 如何在 Handlebars 中使用 json 和 nodeJs expressJs

node.js - 无法解构属性错误 - googleapi

visual-studio-2010 - 在 Windows 7 中构建的 VC++ 程序不能在 Windows Xp 上运行

c++ - NetBeans 7 c++ 远程开发主机包含路径

Node.js 执行在重启后卡住