解决报错:read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I’ll try to do my best with it!
报错信息:
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I’ll try to do my best with it!
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@2.3.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\yalla\AppData\Roaming\npm-cache_logs\2022-06-09T02_09_36_413Z-debug.log
这个报错信息是因为你的npm 版本现在只适用于lockfileVersion@1,但是现在你的package-lock.json是源于lockfileVersion@2的,所以需要升级npm版本就可以了!
npm install -g npm