【发布时间】:2019-10-15 07:48:49
【问题描述】:
Vuetify 2.0.0-beta.0 刚刚发布,我想在一个新的 vue 测试应用程序中尝试一下。 但是当我尝试将它安装在一个全新的项目中时出现错误。以下是我采取的步骤。
我使用@vue/cli v3.8.2 使用默认设置创建一个新项目:
vue create testapp
这给了我成功的结果:
???? Successfully created project testapp.
???? Get started with the following commands:
$ cd testapp
$ npm run serve
然后我使用默认(推荐)预设将 vuetify 插件添加到项目中:
cd testapp
vue add vuetify
这给了我成功:
???? Installing vue-cli-plugin-vuetify...
+ vue-cli-plugin-vuetify@0.5.0
added 1 package from 1 contributor and audited 23942 packages in 9.235s
found 0 vulnerabilities
✔ Successfully installed plugin: vue-cli-plugin-vuetify
? Choose a preset: Default (recommended)
???? Invoking generator for vue-cli-plugin-vuetify...
???? Installing additional dependencies...
added 11 packages from 49 contributors and audited 23980 packages in 9.252s
found 0 vulnerabilities
⚓ Running completion hooks...
✔ Successfully invoked generator for plugin: vue-cli-plugin-vuetify
现在在 package.json 我看到 vuetify 版本:
"vuetify": "^1.5.5"
我现在将其更新为 v2.0.0-beta.0,如下所示:
npm install vuetify@2.0.0-beta.0
我又成功了:
+ vuetify@2.0.0-beta.0
updated 1 package and audited 23980 packages in 10.302s
found 0 vulnerabilities
现在当我尝试运行它时:
npm run serve
我得到错误:
> testapp@0.1.0 serve c:\temp\testapp
> vue-cli-service serve
INFO Starting development server...
98% after emitting CopyPlugin
ERROR Failed to compile with 99 errors 6:17:04 PM
This dependency was not found:
* vuetify/src/stylus/app.styl in ./src/plugins/vuetify.js
To install it, you can run: npm install --save vuetify/src/stylus/app.styl
Failed to resolve loader: sass-loader
You may need to install it.
如果我像这样安装 sass-loader:
npm i -D node-sass sass-loader
我成功了。然后我尝试再次运行它:
npm run serve
现在我又得到了不同的错误:
ERROR Failed to compile with 1 errors 6:27:06 PM
This dependency was not found:
* vuetify/src/stylus/app.styl in ./src/plugins/vuetify.js
To install it, you can run: npm install --save vuetify/src/stylus/app.styl
我被困在这里,因为我不知道如何解决这个错误。 npm install --save vuetify/src/stylus/app.styl 显然不起作用。此外,我也无法通过关注官方vuetify page 来获得此测试版。
【问题讨论】:
-
2.0.0 现已发布。安装和升级说明在这里:github.com/vuetifyjs/vuetify/releases/v2.0.0
标签: vue.js vuetify.js vue-cli-3