0%

ant-design-pro 环境配置

引子

安装NodeJs

Windows

  1. 安装Nodejs

  2. 通过npm安装yarn

yarn 是facebook的一套包管理器

1
npm install -g yarn
  1. 通过yarn安装umi
1
yarn global add umi

Linux

  1. 安装docker
  2. 安装docker-compose
  3. 克隆ant-design-pro
  4. 执行docker-compose up
1
error An unexpected error occurred: "https://registry.yarnpkg.com/@ant-design%2ficons: getaddrinfo EAI_AGAIN registry.yarnpkg.com".
1
2
3
RUN npm set registry https://registry.npm.taobao.org
RUN npm config set registry https://registry.npm.taobao.org
RUN npm config set disturl https://npm.taobao.org/dist

将DockerFile 中

1
2
3
4
RUN \
npm set registry https://registry.npm.taobao.org \
&& npm config set registry https://registry.npm.taobao.org\
&& npm config set disturl https://npm.taobao.org/dist && yarn

欢迎关注我的其它发布渠道