[Vuejs]-Vuetify Version upgrade from 1.5 to 2.0.18 then modules not found error happen

1πŸ‘

βœ…

The problem is you are not importing Vuetify in your project. I assume you installed Vuetify

Change your vuetify.js to:

import '@mdi/font/css/materialdesignicons.css' // Ensure you are using css- 
 loader

import Vue from 'vue'
import Vuetify from 'vuetify';

Vue.use(Vuetify);

export default new Vuetify({
  icons: {
      iconfont: 'mdi'
   },
});

And add this to your main.js:

import 'vuetify/dist/vuetify.min.css'
import './plugins/vuetify'       //instead of import './plugins/vuetify/lib'
Vue.use(Vuetify);
const opts = {
    theme: {
        dark: false,
        themes: {
            light: {
                primary: '#...',
                secondary: '#...',
                accent:'#...',
                error: '#...',
                info: '#...',
                success: '#....',
                warning: '#....'

            },
            dark: {
                primary: '#...',
                secondary: '#...',
                accent:'...',
                ....
            }
        }
    }
};

new Vue({
    router,
    vuetify: new Vuetify(opts),
    render: h => h(App)
}).$mount('#app');

Change the color theme as your wish. I have added … for colors.

For more information on how to migrate from Vuetify version 1.5 to 2 please read Here

Hope it solves your problem πŸ™‚

πŸ‘€DjSh

Leave a comment