1
votes

Hi developers i currently have issue this project is old work of developer, this is already perfectly working on our server and there is no error. however after i pull it on our server and run the project on my localhost it gives Uncaught SyntaxError: Unexpected token '<' after i run watch watch. there is no error on my run watch and php artisan serve.

Question: Why does my app.js file has an error of that.?

I currently use Laravel as backend and Vue Js as front end

error found on my console

app.blade.php

<!doctype html>
<html lang="{{ app()->getLocale() }}">
    <head>
        
        <meta charset="utf-8">
        <link rel="icon" type="text/css" href="{{asset('../public/img/tempologo.png')}}">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
        <meta name="csrf-token" content="{{ csrf_token() }}">
        <title>Mywebsite</title>
        <title>
            @yield('title')
        </title>
        <!-- Fonts -->
        <link rel="stylesheet" type="text/css" href="{{asset('css/app.css')}}">
        <link rel="stylesheet" type="text/css" href="{{asset('css/materialicon.css')}}">
        {{-- <link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css"> --}}
    </head>
    
    <body>
        <div id="app"> </div>
    </body>
    <script src="{{ asset('js/app.js') }}"></script>
    
</html>

Inspection Console

1
what do you mean? - DevGe
app.js is a unique generated of laravel. - DevGe
when i click the app.js error it redirect me on app.blade.php file - DevGe
please see the new update question. - DevGe
Why your the codes in app.js? - xNoJustice

1 Answers

1
votes

Your html has a script tag pointing to /public/js/app.js. This should probably be /js/app.js.