npm,yarn,cnpm,tyarn,pnpm 安使用装配置镜像

npm

安装

安装node后就可以使用了

官方默认地址

npm config set registry https://registry.npmjs.org

镜像

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

全局安装依赖

npm install -g <包名>

局部安装

npm install <包名>

 卸载

npm uninstall <包>

查看当前源

npm config get registry

清理缓存

npm cache clean --force

cnpm                                                                                                                                                            

安装

npm install -g cnpm 

镜像

全局安装依赖

cnpm install -g <包名>

局部安装

cnpm install <包名>

  卸载

cnpm uninstall <包>

查看当前源

cnpm config get registry

yarn

 安装

npm install -g yarn

 官方默认地址

yarn config set registry https://registry.yarnpkg.com/

镜像

yarn config set registry http://registry.npm.taobao.org/
yarn config set registry https://registry.npmmirror.com/

全局安装依赖

yarn global add <包>

局部安装

yarn add <包>

 卸载

yarn remove <包>

查看当前源

yarn config get registry

 清理缓存

yarn cache clean

tyarn

  安装

npm install -g tyarn

 官方默认地址

tyarn config set registry https://registry.npmjs.org

镜像

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

全局安装依赖

tyarn global add <包>

局部安装

tyarn add <包>

 卸载

tyarn remove <包>

查看当前源

tyarn config get registry

pnpm

安装

npm install -g pnpm

 官方默认地址

pnpm config set registry https://registry.npmjs.org

镜像

pnpm config set registry http://registry.npm.taobao.org/
pnpm config set registry https://registry.npmmirror.com/

全局安装依赖

pnpm global add <包>

局部安装

pnpm add <包>

 卸载

pnpm remove <包>

查看当前源

pnpm config get registry

  • 9
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值