使用vue cli创建uniapp项目
官网创建方法
根据uniapp官方文档所写,使用如下方法创建:
# 创建以 javascript 开发的工程
npx degit dcloudio/uni-preset-vue#vite my-vue3-project
# 创建以 typescript 开发的工程
npx degit dcloudio/uni-preset-vue#vite-ts my-vue3-project
但是在创建的过程中,git报以下错误:
$ npx degit dcloudio/uni-preset-vue#vite-ts my-vue3-project
npx: 1 安装成功,用时 4.017 秒
! could not fetch remote https://github.com/dcloudio/uni-preset-vue
! could not find commit hash for vite-ts
顾名思义 是不能访问远程仓库 ,所以切换成淘宝镜像,切换参考文章,切换之后,再次创建工程,出现以下错误
! could not download https:/