zl程序教程

您现在的位置是:首页 >  后端

当前栏目

【Nodejs】npm cnpm 淘宝镜像

Nodejsnpm镜像 淘宝 cnpm
2023-09-11 14:17:09 时间

一.通过命令配置

1. 命令

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

2. 验证命令

npm config get registry

如果返回https://registry.npm.taobao.org,说明镜像配置成功。

 

 

npm info express

如果返回:

 

二、通过使用cnpm安装
1. 安装cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org

2. 使用cnpm

cnpm install xxx