报错
npm WARN npm npm does not support Node.js v16.14.2 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11. npm WARN npm You can find the latest version at https://nodejs.org/ npm ERR! cb.apply is not a function npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Yang\AppData\Roaming\npm-cache\_logs\2022-05-17T02_08_10_465Z-debug.log
原因
npm版本过旧,安装最新版本
解决
这里碰到了一个死循环,使用npm升级语句也报上面的错
npm install -g npm@8.1
所以咱用cnpm去升级npm,运行下面语句就好了
cnpm install -g npm