方法 一、直接使用命令 npx rimraf node_modules 二、安装 rimraf 再删除 # 安装 rimraf npm install -g rimraf # 删除node_modules rimraf node_modules