【发布时间】:2021-07-10 23:49:10
【问题描述】:
请我是 Vuejs 新手,在安装 Vuejs/CLI 后,我使用 vue create test 创建了一个新项目,然后我提示我在三个选项之间进行选择
> Default ([Vue 2] babel, eslint)
Default (Vue 3 Preview) ([Vue 3] babel, eslint)
Manually select features
然后我选择了第二个选项Default (Vue 3 Preview) ([Vue 3] babel, eslint),然后它继续安装必要的依赖项并创建了应用程序文件夹,完成后我检查了项目目录,我发现唯一的东西是 node_modules、package.json 和 package_lock。 json 没有安装默认文件夹和 html 文件,当我运行 npm run serve 时,它给了我这个错误
npm ERR! Missing script: "serve"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in: <dir>
这是我的 package.json 内容
{
"name": "test",
"version": "0.1.0",
"private": true,
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0"
}
}
请问是什么原因造成的错误
【问题讨论】:
标签: javascript html vue.js vue-cli javascript-framework