My App.Vue
<template>
<div id="app">
<router-view></router-view>
</div>
</template>
<script>
export default {
name: 'app',
data () {
return {
}
}
}
</script>
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
My Home.Vue component
<template>
<div>
<h1>Home</h1>
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
My main.js
import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-route';
import Home from './components/home/Home.vue';
Vue.use(VueRouter);
var router = new VueRouter({
routes: [
{ path: '/', component: Home },
]
})
new Vue({
el: '#app',
router,
render: h => h(App)
})
I'm having this error, I'm using the vue-route
TypeError: Vue.directive is not a function