如何方便安全删除 webpack的 node_modules文件夹

清除缓存

npm cache clean -f
// 报错就用下面的
npm cache verify

或者
yarn cache clean --force

 

删除全部依赖node_modules目录

全局安装 rimraf

npm install rimraf -g

 

cmd 找到项目目录 执行

 rimraf node_modules
posted @ 2022-03-09 10:23  时间观测者  阅读(116)  评论(0编辑  收藏  举报