yarn create umi安装Ant Design Pro的时候报错Error: Command failed: git clone

yarn create umi安装Ant Design Pro的时候报错Error: Command failed: git clone

错误:

D:\workspace\ManagerUI\antDesign>yarn create umi
yarn create v1.17.3
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "[email protected]" with binaries:
      - create-umi
? Select the boilerplate type ant-design-pro
? Which language do you want to use? JavaScript
> git clone https://github.com/ant-design/ant-design-pro --depth=1 D:\workspace\ManagerUI\antDesign
events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: Command failed: git clone https://github.com/ant-design/ant-design-pro --depth=1 D:\workspace\ManagerUI\antDesign
Cloning into 'D:\workspace\ManagerUI\antDesign'...
fatal: unable to access 'https://github.com/ant-design/ant-design-pro/': Failed to connect to github.com port 443: Timed out


    at makeError (C:\Users\YBJB\AppData\Local\Yarn\Data\global\node_modules\execa\index.js:174:9)
    at Promise.all.then.arr (C:\Users\YBJB\AppData\Local\Yarn\Data\global\node_modules\execa\index.js:278:16)
    at process._tickCallback (internal/process/next_tick.js:68:7)
Emitted 'error' event at:
    at Immediate.setImmediate (C:\Users\YBJB\AppData\Local\Yarn\Data\global\node_modules\yeoman-generator\lib\index.js:436:22)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
error Command failed.
Exit code: 1
Command: C:\Users\YBJB\AppData\Local\Yarn\bin\create-umi
Arguments:
Directory: D:\workspace\ManagerUI\antDesign
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

国内环境问题,有网友说切换成cyarn可解决

我是直接挂了个vpn解决

或者切换使用国内加速,npm命令使用国内加速也可以

发布了120 篇原创文章 · 获赞 153 · 访问量 18万+

猜你喜欢

转载自blog.csdn.net/symuamua/article/details/104759166