採坑過程中,找到有那麼幾個方式,用適合自己的方式去執行就好
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/