一次性卸载npm本地包(node_modules)依赖

卸载所有package.json依赖包

npm uninstall `ls -1 node_modules | tr '/
' ' '`

以上命令需要shell环境执行。

在windows环境下,可创建uninstall.sh文件,文件内容为上述命令内容。执行uninstall.sh文件也可达到相同效果

@萍2樱释ღ( ´・ᴗ・` )

打不死的小强
原文地址:https://www.cnblogs.com/mggahui/p/14784073.html