PacktPublishing / Full-Stack-Web-Development-with-Vue.js-and-Node

Full-Stack Web Development with Vue.js and Node, by Pack
MIT License
54 stars 42 forks source link

An error occurred integrating Vuetify into Vue #1

Open lcy19 opened 2 years ago

lcy19 commented 2 years ago

Hi, when learning the chap5, program can't run correctly. main.js

// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import 'bootstrap/dist/css/bootstrap.min.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import BootstrapVue from 'bootstrap-vue'

import Vue from 'vue'
import Vuetify from 'vuetify'
import App from './App'
import router from './router'

Vue.use(BootstrapVue)
Vue.use(Vuetify)
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})

package.json

...
"dependencies": {
    "bootstrap": "^5.1.3",
    "bootstrap-vue": "^2.21.2",
    "vue": "^2.5.2",
    "vue-router": "^3.0.1",
    "vuetify": "^2.6.4"
  },
...

get the error:

[Vue warn]: Error in beforeCreate hook: "Error: Vuetify is not properly initialized, see https://vuetifyjs.com/getting-started/quick-start#bootstrapping-the-vuetify-object"

But the link isn't effective. Thanks for any suggestions!

N4V3H3114 commented 4 months ago

I hate to comment on something so old but this is the exact problem I'm having. Were you able to get it working?