npm修改镜像源

背景:切换npm镜像源是经常遇到的事,下面记录下具体操作命令

1. 打开终端运行"npm config get registry"命令来查看当前配置的镜像源

bash 复制代码
npm config get registry

2. 修改成淘宝镜像源"https://registry.npmjs.org/"

bash 复制代码
npm config set registry https://registry.npm.taobao.org/

3. 查看修改结果,证明已修改成功

bash 复制代码
npm config get registry

npm 的镜像源已更改为你设置的镜像源,npm将使用新的镜像源下载包

4. 改回官方镜像源

bash 复制代码
 npm config set registry https://registry.npmjs.org/

大功告成END!

相关推荐
亮子AI1 分钟前
Chrome 和 Edge 生成的 fingerprint 是一样的?
前端·chrome·edge
狼性书生2 分钟前
uniapp实现的时间范围选择器组件
前端·uni-app·vue·组件·插件
挫折常伴左右8 分钟前
HTML中的表单
前端·html
天问一10 分钟前
前端引用printJS打印
前端·arcgis
xinyu_Jina1 小时前
PaperStudio:WYSIWYG文档的Web实现——从CSS Print到客户端PDF生成的技术解析
前端·css·pdf
默默学前端1 小时前
html列表标签及css列表属性
前端·css·html5
天天扭码10 小时前
如何实现流式输出?一篇文章手把手教你!
前端·aigc·ai编程
前端 贾公子11 小时前
vue移动端适配方案 === postcss-px-to-viewport
前端·javascript·html
GISer_Jing12 小时前
AI营销增长:4大核心能力+前端落地指南
前端·javascript·人工智能