Npm如何设置淘宝镜像

Npm如何设置淘宝镜像

1.打开终端,输入以下命令,设置淘宝镜像源:

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

 最新淘宝镜像地址

npm config set registry https://registry.npmmirror.com

2. 输入以下命令,查看是否设置成功:

npm config get registry

3. 现在你就可以正常使用npm安装包了

4.如果你想恢复成原来的官方镜像源,只需要输入以下命令:

npm config set registry https://registry.npmjs.org
posted @ 2024-02-22 10:08  haonanElva  阅读(3139)  评论(0编辑  收藏  举报