I am using 2.0.0-beta.7 version of vuetify on a newly setup Vue project. I am getting below errors
Error in getter for watcher "isDark": "TypeError: Cannot read property 'dark' of undefined"
also,
TypeError: Cannot read property 'dark' of undefined
plugins/vuetify.js
import Vue from 'vue';
import Vuetify from 'vuetify/lib';
const opts = {
icon: {
iconfont: 'fa',
}
};
Vue.use(Vuetify);
export default new Vuetify(opts);
main.js
import Vue from "vue";
import Vuetify from './plugins/vuetify';
import App from "./App.vue";
import router from "./router";
import store from "./store";
Vue.config.productionTip = false;
new Vue({
router,
store,
Vuetify,
render: h => h(App)
}).$mount("#app");
Below links helped in identifying that there is some issue in my setup.
new Vue({ router, store, Vuetify, render: h => h(App) })
It has to be lowercase here:
import vuetify from './plugins/vuetify'
new Vue({
router,
store,
vuetify,
render: h => h(App)
})
来源:https://stackoverflow.com/questions/57019082/setting-up-new-vuetfy-2-beta-7-error-in-getter-for-watcher-isdark