Umi ui添加模块失败:
- antd版本4.0.0
- umi版本2.13.0
⚓ Start git fetch
⚓ Start git fetch
🎉 Success git fetch
⚓ Start git fetch
🎉 Success git fetch
⚓ Start git checkout master
⚓ Start git fetch
🎉 Success git fetch
⚓ Start git checkout master
error: pathspec 'master' did not match any file(s) known to git
⚓ Start git fetch
🎉 Success git fetch
⚓ Start git checkout master
error: pathspec 'master' did not match any file(s) known to git
Faild git checkout: Command failed: git checkout master
undefined
undefined
⚓ Start git fetch
🎉 Success git fetch
⚓ Start git checkout master
error: pathspec 'master' did not match any file(s) known to git
Faild git checkout: Command failed: git checkout master
undefined
undefined
🚧 Execute task error: Error: Command failed: git checkout master
undefined
undefined
⚓ Start git fetch
🎉 Success git fetch
⚓ Start git checkout master
error: pathspec 'master' did not match any file(s) known to git
Faild git checkout: Command failed: git checkout master
undefined
undefined
🚧 Execute task error: Error: Command failed: git checkout master
undefined
undefined
解决方法:
检查了下Umi ui 版本没问题。
检查了下环境,可能有问题,重新全局安装了下react, react-dom, antd, umi, 项目重新cnpm install。
换了下包管理器,使用cnpm淘宝源。
最后正常了。云里雾里。
猜测可能是react,antd,umi依赖了什么包之前没有安装好,没报错但是有警告。