TrilonIO / aspnetcore-Vue-starter

*NEW* Asp.net Core & Vue.js (ES6) SPA Starter kit - Vuex, webpack, Web API, Docker, and more! By @TrilonIO
https://www.trilon.io
MIT License
1.22k stars 266 forks source link

Any luck getting this to work with Buefy? #83

Open Morkaleb opened 6 years ago

Morkaleb commented 6 years ago

So I've followed the instructions here: https://buefy.github.io/#/documentation/start

placing the Vue.Use(Beufy.default) in app-root

This has created the error "Cannot read property 'install' of undefined"

Am I missing something?

Morkaleb commented 6 years ago

Ok, I figured out the problem, thanks to anyone who looked :)

Nordes commented 6 years ago

;) Please tell us what you've done. It might help anyone getting an error while using Beufy.

Morkaleb commented 6 years ago

I was adding it to the client app in app-root using:

`<template>...</template
<script>
    using Buefy from 'Buefy'
   ......

Vue.Use(Buefy)
</script
`

like that it didn't work, no components could see any Buefy components as registered.

I put it in App.js, like this:



`import Vue from 'vue'
import axios from 'axios'
import router from './router'
import store from './store'
import { sync } from 'vuex-router-sync'
import App from 'components/app-root'
import Buefy from 'buefy'
import 'buefy/lib/buefy.css'

Vue.prototype.$http = axios;
Vue.use(Buefy)
sync(store, router)

const app = new Vue({
    store,
    router,
    ...App
})

export {
    app,
    router,
    store
}
`

```And now it works