npm 镜像源查看修改

1 查看npm镜像源的地址 : 

npm config get registry

 

2 设置npm镜像源为淘宝 : 

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

 

3 还原npm官方默认源 :  

npx nrm use npm

 或者

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

 

4 检查 安装包的所有可安装版本:

npm view electron versions

 

5 安装初始化 package :

npm init

 

6 安装包至本地 package 项目 非全局:

npm install electron --save-dev

 

7 删除安装包:

npm uninstall electron

 

posted @ 2022-06-27 23:41  蘇大锤  阅读(5240)  评论(1)    收藏  举报