Git下安装Hexo出现npm问题的解决办法
在安装hexo时,需要使用npm命令来安装hexo,此时使用下面的命令来安装:
npm install -g hexo
但是使用了这个命令后,会出现
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
audited 30855 packages in 12.173s
found 8 vulnerabilities (1 low, 1 moderate, 5 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit fix --force` for details
此时提示我们需要运行
npm audit fix 或 npm audit fix --force
但是当执行了上面的命令后,仍然报错,甚至是一样的错误。
这是因为npm开启了代码审查,在开发阶段可以关闭审查设置,关闭审查命令如下:
npm set audit false
执行完上述命令后,就不会出现那种错误了,并且一切正常运行。