node.js - 如何递归卸载所有 node_modules 文件夹

标签 node.js recursion npm uninstallation

我有一个非常复杂的项目,其中包含依赖项和子依赖项。我的项目中有 git 子模块,它们具有 npm 依赖项。

有没有一种快速有效的方法来递归清理项目中的所有 node_modules 文件夹?

最佳答案

只需在 package.json 文件中清除所有要删除的依赖项,然后运行 ​​npm prune

关于node.js - 如何递归卸载所有 node_modules 文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39016014/

相关文章:

c - 递归生成文件未构建

java - Java中如何处理递归关闭 Action ?

c++ - 使用除法技术求数组的最大公约数

javascript - svg 到 json.js |我的文件去哪儿了?

node.js - 捕获错误 401 adonis.js 错误 E_INVALID_SESSION : Invalid session

javascript - 如何从 Azure Active Directory (AAD) Web API 检索 access_token

Node.js 错误错误 : Cannot find module 'bluebird'

javascript - HTTP JSON API SERVER 中的这段代码在 learnyounode 中起到了什么作用

node.js - (node-gyp rebuild 2> builderror.log) || (exit 0) - Node 安装错误

javascript - 如何在 Netsuite 中使用 Node.js?