1. 安装最新版node版本: node-v16.17.0-x64.msi,使用npm初始化vue3 project。
2. 遇到报错Failed to download repo vuejs-templates/my-project: Response code 404
F:\vscode-workspace>vue init my-project
? Generate project in current directory? Yes
vue-cli · Failed to download repo vuejs-templates/my-project: Response code 404 (Not Found)
F:\vscode-workspace>vue create my-projectvue create is a Vue CLI 3 only command and you are using Vue CLI 2.9.6.
You may want to run the following to upgrade to Vue CLI 3:npm uninstall -g vue-cli
npm install -g @vue/cli
升级vue-cli版本:
npm uninstall -g vue-cli
npm install -g @vue/cli
重新create即可。