报错信息
npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! Unexpected end of JSON input while parsing near '...:"~0.0.0","webpack-de'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\文件路径\npm-cache_logs\2018-12-13T10_24_02_151Z-debug.log
Package install failed, see above.
(具体的报错信息和这个类似)
升级 hexo5.0 过程中,npm i –save 出错,各种插件都不能很好的下载。
问题解决
在 node 安装目录下配置的 node_cache 目录里面 D:\Develop\nodejs
系统盘的 AppData/roaming 的文件夹并没有一个 npm 的缓存目录,安装 node 的时候将D:\Develop\nodejs
放到系统环境变量的 Path 路径了。
所以只需要一下两条命令即可
npm cache clean --force
npm install
**