Ant Design Pro V4 零基础安装(小白级教程)

一、准备工作

  1. 安装Git,官网下载地址:https://git-scm.com/download/win
  2. 安装Node,官网下载地址:https://nodejs.org/zh-cn/
  3. 安装python2.7(某些依赖需要),待更新(可自行搜索安装)。
  4. 利用Visual Studio安装C++环境(某些依赖需要),待更新(可自行搜索安装)

二、环境配置

  1. npm设置淘宝源:
 npm config set registry https://registry.npm.taobao.org
  1. 安装yarn并设置淘宝源:
npm install -g yarn --registry=https://registry.npm.taobao.org
yarn config set registry https://registry.npm.taobao.org -g
  1. 安装tyarn:
npm install yarn tyarn -g

Tips:以上操作是在window10操作的,用CMD或者PowerShell都行,如果用PowerShell的话,要先把PowerShell允许脚本运行命令策略打开:

set-executionpolicy remotesigned

然后输入“Y”确认。

三、安装Ant Design Pro

  1. npm create umi
  2. git init
  3. tyarn install

Tips:可参照我的这篇文章:Ant Design Pro V4安装慢的问题解决

四、一些问题

参照官网的安装很简单,全程就用两步就完成了。但是经过本人的测试,全程参照使用npm安装速度极慢,有时候会安装失败,报各种各样的问题。我觉得官网的教程是针对有基础的人来的,但是苦了我们这些小白啊。。。然后经过多次尝试摸索出本文的安装方法。

猜你喜欢

转载自blog.csdn.net/qq_18913129/article/details/105450587