Reputation: 13
I want to use Buefy
in a new Vue 3 Project. It should support Vue 3 as I read.
In the Buefy
Docs is mentioned to integrate it with the following lines (source)
import Buefy from 'buefy';
import 'buefy/dist/buefy.css';
Vue.use(Buefy);
To the createApp() method I applied the given code in the main.js-file:
createApp(App).use(Buefy).mount('#app')
By executing the Vue Script there's the error in browsers console "Uncaught TypeError: can't access property "$buefy", Vue.prototype is undefined" and I receive a blank page. No error while compiling. Looked the error already up, got no solution.
How can I fix this error to use Buefy
? Or have I made a mistake in advance?
Thanks for your help.
Upvotes: 1
Views: 632
Reputation: 63059
Vue.prototype
is the object onto which plugins try to install in Vue 2. In Vue 3, plugins are not registered this way, and does not support the old syntax, which is why you got this error.
This indicates that the package/installation is not available for Vue 3. This is confirmed in the discussion thread for GitHub Issue #2505 in the Buefy package, in which it has recently been stated that the Vue 3 branch is still a work-in-progress.
So for now you'll have to wait until it supports Vue 3, or switch to Vue 2 to use Buefy.
Upvotes: 3