Uncaught TypeError: Vue.component is not a function

Solution:

import vue properly in your code using import keyword like this:

//import vue
import Vue from 'vue';

//register component
Vue.component('yourComponentName',require('./components/yourComponentName.vue').default);

//initialize vue
const app = new Vue({
    el: '#app',
});

1

Change your package.json

"laravel-elixir-vue-2": "^0.3.0"

And run

<!-- language: lang-js -->
npm install

OR

2

npm install laravel-elixir-vue-2 --save-dev

And then

Change your gulpfile.js like this

<!-- language: lang-js -->
var elixir = require('laravel-elixir')

require('laravel-elixir-vue-2');