vue-cli创建vue2 uni-app项目步骤,及报错解决方案
1、安装vue-cli
npm install -g @vue/cli@4
官方提供命令是
npm install -g @vue/cli
安装的是版本5,但uni-cli仅支持vue-cli 4.x版本,启动会报错
2、使用vue-cli构建项目
vue create -p dcloudio/uni-preset-vue my-project
这个步骤会报如下错误:
ERROR Failed to get response from https://registry.npm.taobao.org/binary-mirror-config
yarn install v1.22.22
info No lockfile found.
[1/4