Min's blog

I choose to see the beauties in the world.

导航

npm相关

Posted on 2019-08-27 11:24  Min77  阅读(62)  评论(0编辑  收藏  举报

1.npm 更新到最新npm i -g npm

2.npm 版本查看 npm -v

3.npm 切换镜像 npm install -g nrm

4.查看可用源

nrm ls
* npm -----  https://registry.npmjs.org/
  cnpm ----  http://r.cnpmjs.org/
  taobao --  https://registry.npm.taobao.org/
  nj ------  https://registry.nodejitsu.com/
  rednpm -- http://registry.mirror.cqupt.edu.cn
  skimdb -- https://skimdb.npmjs.com/regist

5.镜像安装 npm install -g cnpm

6.切换镜像源 npm use taobao

7.删除镜像 npm del  taobao

8.淘宝镜像直接安装 npm config set registry https://registry.npm.taobao.org