背景
执行命令:npx pro create myapp
报错内容:
× An error occured while running #writing
C:\Program Files\nodejs\node_global\node_modules@ant-design\pro-cli\node_modules\execa\lib\error.js:60
error = new Error(message);
^
Error: Command failed with exit code 1: git clone https://gitee.com/ant-design/ant-design-pro --depth=1 --branch umi@3 myapp
at makeError (C:\Program Files\nodejs\node_global\node_modules@ant-design\pro-cli\node_modules\execa\lib\error.js:60:11)
at handlePromise (C:\Program Files\nodejs\node_global\node_modules@ant-design\pro-cli\node_modules\execa\index.js:118:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async AntDesignProGenerator.writing (C:\Program Files\nodejs\node_global\node_modules@ant-design\pro-cli\src\create\generators\ant-design-pro\index.js:108:5) {
shortMessage: 'Command failed with exit code 1: git clone https://gitee.com/ant-design/ant-design-pro --depth=1 --branch umi@3 myapp',
command: 'git clone https://gitee.com/ant-design/ant-design-pro --depth=1 --branch umi@3 myapp',
escapedCommand: 'git clone "https://gitee.com/ant-design/ant-design-pro" "--depth=1" --branch "umi@3" myapp',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: undefined,
stderr: undefined,
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
方案
方案1:
安装git:https://git-scm.com/downloads
方案2
关掉梯子
正文完
发表至: 未分类
2024-01-24