问题描述:
提示:npm install 报错 npm ERR! Unexpected end of JSON input while parsing near '…0.2.tgz"}
解决方案:
方案一:
npm cache clean --force
方案二:
npm config set registry http://registry.npmjs.org/
方案三:
①第一步:npm cache clean --force
②第二步:切换为淘宝镜像:
npm config set registry https://registry.npm.taobao.org/
npm config get registry https://registry.npm.taobao.org/
③第三步:npm install
注:验证时候切换淘宝镜像成功,命令行输入: npm config list