umijs / umi-blocks

Official collection of some high quality blocks.
https://blocks.umijs.org
MIT License
229 stars 50 forks source link

error: pathspec 'master' did not match any file(s) known to git #23

Open zhaocz2015 opened 5 years ago

zhaocz2015 commented 5 years ago
$ umi block add ant-design-pro/Analysis
√ Parse url and args
√ Git fetch
× Git checkout master
×  error     Error: Error: Command failed: git checkout master
error: pathspec 'master' did not match any file(s) known to git

    at D:\tmp\learnAntd\xboot-antd\node_modules\umi-build-dev\lib\plugins\commands\block\index.js:154:15
    at Generator.throw (<anonymous>)
    at asyncGeneratorStep (D:\tmp\learnAntd\xboot-antd\node_modules\umi-build-dev\lib\plugins\commands\block\index.js:36:103)
    at _throw (D:\tmp\learnAntd\xboot-antd\node_modules\umi-build-dev\lib\plugins\commands\block\index.js:38:291)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Hello Guys , what is the reason for the error

huangziye commented 5 years ago

我也遇到了同样的问题?想问你解决了吗?

umi版本的问题,你看的你的umi版本是不是2.8.6,另外,你还需要把全局的umi卸载掉及执行 npm uninstall -g umi