打开配置文件:找到并编辑你的npm配置文件(通常位于用户主目录下的.npmrc文件)。 nano ~/.npmrc 1. 添加或修改源地址:在配置文件中添加或修改如下内容: registry=https://registry.npmmirror.com 1. 保存并退出:保存文件并退出编辑器。 验证是否修改成功: npm config get registry 1. 如果返回的是https://regist...
npm切换淘宝源镜像 npmconfigsetregistryhttps://registry.npm.taobao.org/ npm切换官方源镜像 npmconfigsetregistryhttps://registry.npmjs.org/ npm查看当前源镜像地址 npmconfiggetregistry