前端环境安装

查看本机npm镜像

npm config get registry
默认镜像: https://registry.npmjs.org
淘宝镜像: http://registry.npm.taobao.org/

设置淘宝镜像

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

使用镜像管理工具 nrm 切换

安装nrm

npm install -g nrm

查看镜像

nrm ls

切换镜像

nrm use taobao

yarn安装

npm install -g yarn
yarn --version
yarn config set registry https://registry.npm.taobao.org

posted @ 2022-08-25 22:53  道之缘  阅读(35)  评论(0编辑  收藏  举报