Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

afoysal's avatar

VueJS in Server

I used VueJS component inside blade file. My Blade file code is like below.

@extends('layouts.admin.app')

@section('title', 'Time')

@push('css_or_js')
@endpush

@section('content')
    <div>
        <time-component />
    </div>
@endsection

I added app.js file like below.

<script src="{{ asset('js/app.js') }}" defer></script>
    </body>
</html>

It is working perfectly in localhost. I ran npm run prod command. After that I uploaded all files in Server. But I am getting error Loading failed for the <script> with source “http://myserver.com/js/app.js”. in console. How can I solve the issue ?

0 likes
2 replies
vincent15000's avatar

You have to find why the loading has failed.

Do you have any further information ? Any further details about the error ?

1 like

Please or to participate in this conversation.