如果出现无法初始化的
npm i -g @vue/cli-init
或者
检查一下vue -V 是否配好了(有可能是 路径没有添加到环境变量中)
npm 的正常配置
一.初始化一个项目
vue init webpack hello4
? Project name hello4
? Project description A Vue.js project
? Author hdy <2855181983@qq.com>
? Vue build standalone
? Install vue-router? Yes
? Use ESLint to lint your code? No
? Set up unit tests No
? Setup e2e tests with Nightwatch? No
? Should we run `npm install` for you after the project has been created? (recommended) npm
vue-cli · Generated “hello4”.