Vue运行时错误 - 未捕获的类型错误:无法读取未定义的属性(读取'install')

21 浏览
0 Comments

Vue运行时错误 - 未捕获的类型错误:无法读取未定义的属性(读取'install')

在尝试在浏览器中加载我的应用程序时,我遇到了这个错误。构建过程运行正常,没有任何错误。但是当我尝试加载应用程序时,我在控制台中得到一个空白页面和以下单个错误:\n

vue.runtime.esm.js:5106 Uncaught TypeError: Cannot read properties of undefined (reading 'install')

\n我看过这个问题,但它没有解决我的问题,因为我的vuetify.js看起来已经没问题了:\n

import Vue from 'vue';
import Vuetify from 'vuetify/lib';
import '@mdi/font/css/materialdesignicons.css'
import 'vuetify/dist/vuetify.min.css'
import { preset } from 'vue-cli-plugin-vuetify-preset-fortnightly/preset';
Vue.use(Vuetify);
export default new Vuetify({
    preset,
    theme: {
        dark: false,
        default: 'light'
    }
});

\n如果有人能帮忙解决这个问题,我将非常感激。提前谢谢!\n编辑\n我刚刚在跟随一个控制台链接到一个名为vue.runtime.esm.js的文件后看到了以下内容。\n在开发控制台中,代码的.install === \'function\'部分下面有一个红色波浪线。\n

// additional parameters
    var args = toArray(arguments, 1);
    args.unshift(this);
    if (typeof plugin.install === 'function') {
      plugin.install.apply(plugin, args);
    } else if (typeof plugin === 'function') {
      plugin.apply(null, args);
    }

0