采坑过程中,找到有那么几个方式,用适合自己的方式去执行就好 1.删掉package.lock.json 2.清除cache npm cache clean --force 3.进入下面这个文件夹清除cache 路径:C:/Users/PC/AppData/Roaming/npm-cache 执行(博主自己是用了这个才解决): npm cache clean --force 4.不要用淘宝镜像。 npm set registry https://registry.npmjs.org/