npm安装完包后出现如下提示信息:
found 2504 vulnerabilities (1360 low, 1109 moderate, 29 high, 6 critical)
run `npm audit fix` to fix them, or `npm audit` for details
然后输入npm audit fix
后提示:
C:\WINDOWS\system32>npm audit fix
npm ERR! code EAUDITNOPJSON
npm ERR! audit No package.json found: Cannot audit a project without a package.json
于是乎查阅资料,发现是没有json文件的问题
解决方案:
npm init --yes
然后重新运行npm audit fix
即可