1、在node_modules文件夹所在的目录打开cmd窗口,安装包管理器:rimraf 。rimraf 包的作用:以包的形式包装rm -rf命令,用来删除文件和文件夹的,不管文件夹是否为空,都可删除.
rimraf
rm -rf
npm install rimraf -g
2、执行删除命令
rimraf node_modules