贝塔-2.0.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版本:
我现在将其更新为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
现在,当我try 运行它时:
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
我成功了.然后我再次try 运行它:
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测试版来实现这一点.