Setting up new Vuetfy 2 Beta 7 - Error in getter for watcher “isDark”

随声附和 提交于 2019-12-02 06:54:24

问题


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.

  • https://stackoverflow.com/a/56367842/4050261
  • https://github.com/vuetifyjs/vuetify/releases/tag/v2.0.0-beta.0
  • https://github.com/vuetifyjs/vuetify/releases/tag/v2.0.0-beta.7

回答1:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!