npm ERR! notarget No matching version found for xxx@^1.0.64. npm 插件安装失败解决

问题

今天使用npm install安装项目依赖的时候报错:npm ERR! notarget No matching version found for xxx@^1.0.64. npm

npm ERR! code ETARGET
npm ERR! notarget No matching version found for xxx@^1.0.64.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

解释:在安装某插件过程中查找不到此插件的这个版本号

原因

1、可能是您当初设置的镜像源为淘宝镜像源 npm https://registry.npm.taobao.org
2、然而淘宝镜像源没有及时更新此插件版本,从而引起插件安装错误

解决办法

1、检测当前镜像源

npm config get registry

2、修改镜像源为npm

npm config set registry https://registry.npmjs.org

3、尝试重新下载插件,此时您应该可以下载插件了

4、完成下载后便可切换镜像源至淘宝镜像源

npm config set registry https://registry.npm.taobao.org

© 版权声明
THE END
我的博客即将同步至腾讯云+社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=270198dipw4ko
点赞13赞赏 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容