npm

1、npm修改全局配置

npm config set prefix "D:\nodejs\node_global"
npm config set cache "D:\nodejs\node_cache"

2、npm获取全局安装的默认目录

npm config get prefix

3、npm永久配置淘宝镜像

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

4、npm单次使用淘宝镜像

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

5、npm改回默认镜像

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

6、npm查看镜像来源

npm config get registry

7、npm全局安装插件

yarn

1、yarn设置全局安装目录

yarn config  set global-folder "D:\Software\yarn\global"

2、yarn设置缓存目录

yarn config set cache-folder "D:\Software\yarn\cache"

3、yarn查看全局bin目录

yarn global bin

4、yarn查看全局安装目录

yarn global dir

5、yarn 查看镜像

yarn config get registry

6、yarn设置淘宝镜像

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

7、yarn全局安装插件

yarn global add create-umi

其他

1、创建一个react项目

create-react-app 项目目录

2、创建ant design pro项目

yarn create umi 或者 npm create umi

 

相关文章:

  • 2021-11-29
  • 2021-11-03
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
猜你喜欢
  • 2022-12-23
  • 2021-04-08
  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
  • 2022-03-02
相关资源
相似解决方案