Search code examples
laravelvue.jslaravel-blade

laravel [Vue warn]: Error compiling template:


I'm not using any vue component in my app i just use app.js file in order to compile my npm packages to my assets js/app.js or css/app.css but i'm getting [Vue warn]: Error compiling template: error in console.

I'm not sure why is that!

Code

app.js file:

require('./bootstrap');
window.Vue = require('vue');
import clipboard from 'clipboard';

Vue.component('example-component', require('./components/ExampleComponent.vue'));

const app = new Vue({
    el: '#app'
});

Layout

<body>
    <div id="app">
        <div class="container-scroller">
           @include('admin.partials.navbar')
           @yield('content')
        </div>
    </div>
</body>

blades

@extends('layouts.admin')
@section('content')
data
@endsection

Any idea?


Solution

  • SOLVED

    Yet i'm not sure why but i added Vue.use(clipboard); and it has stopped to show error.