npm install报错:This version of npm is compatible with lockfileVersion@1, but package-lock.json...

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!

解决方法1:npm install -g npm(网上的方法)

解决方法2:降低Node的版本,例如降低到10.15.0再试试npm install和cnpm install,降低到8.11.0再试试(这个可行)

你可能感兴趣的:(npm,前端,vue,node.js)