vue项目创建选项明细

打开控制台进入想要创建项目的目录

vue init webpack ”项目名称“

? Project name personal
? Project description A Vue.js project
? Author ppzy123
? 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

那几个no一定要no,不然写起来会很惨

 

npm报错出现缺少babel
治标的解决方法:
找到你的工程文件夹里的 YourProName\node_modules\vue-loader\lib\template-compiler\index.js
//将以下代码
if (!isProduction) {
code = prettier.format(code, { semi: false, parser: 'babylon' })
}
//修改为:
if (!isProduction) {
code = prettier.format(code, { semi: false, parser: 'babel' })

posted @ 2021-06-28 07:48  要记得吃饭啊  阅读(223)  评论(0编辑  收藏  举报