Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
64
rated 0 times [  66] [ 2]  / answers: 1 / hits: 47340  / 5 Years ago, wed, july 31, 2019, 12:00:00

I have setup Vuetify on my Vue webpack application.



My project is setup with vue init webpack my-project running Vue 2.5.2 and using Vuetify 2.0.2.



I have installed Vuetify in my App.js



import Vue from 'vue'
import '../node_modules/vuetify/dist/vuetify.min.css';
import App from './App'
import router from './router'
import store from './store'
import Vuetify from 'vuetify'

Vue.use(Vuetify)

/* eslint-disable no-new */
new Vue({
el: '#app',
router,
store,
render: h => h(App)
})


Everything seems to be working fine. I'm able to call Vuetifycomponents in one of my components.



<template>
<v-container>
<v-card width=400 height=150 raised>
<h4>Hello</h4>
</v-card>
</v-container>
</template>


I then read that I need to wrap my App.js with the v-app component, but when I do that I get an error saying: Error: Vuetify is not properly initialized.



<template>
<div id=app>
<v-app>
<NavigationBar />
<v-content>
<router-view />
</v-content>
</v-app>
</div>
</template>


Maybe Vuetify isn't installed correctly, I hope some of you can bring some light on my issue.


More From » vue.js

 Answers
4

There is lot of changes with new version.



try this



import Vue from 'vue';
import Vuetify from 'vuetify';
Vue.use(Vuetify);

new Vue({
vuetify : new Vuetify(),
...
});


good luck


[#51817] Wednesday, July 24, 2019, 5 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ariel

Total Points: 523
Total Questions: 111
Total Answers: 100

Location: Anguilla
Member since Sun, Jan 29, 2023
1 Year ago
;