npm查看-切换源
npm查看、切换源
npm查看、切换源
npm:Node Package(包) Manager(管理器)。
新淘宝镜像源: https://registry.npmmirror.com
1.查看镜像源
npm get registry
2.切换官方源
npm config set registry https://registry.npmjs.org
3.切换淘宝源
npm config set registry https://registry.npmmirror.com
4.查看全局安装包列表
npm list -g –depth 0
5.临时使用
npm –registry http://[镜像主机ip]:[镜像监听端口]
6.永久使用
npm set registry http://[镜像主机ip]:[镜像监听端口]
7.查看某个依赖的全部版本
npm view @vue/cli versions
yarn 原始源:https://registry.yarnpkg.com
本文由作者按照 CC BY 4.0 进行授权