试过网上的删除node_modules文件夹并执行npm cache clean --force 命令并重新npm install 错误依旧存在
后面查看npm源是用的淘宝源
重复尝试上述操作后
再执行npm config set registry http://registry.npmjs.org
再npm install
问题解决。
20200515补充:
遇到npm ERR! Unexpected end of JSON input while parsing near.. 错误也可以用上述方法解决