[Vuejs]-GET http://localhost/resources/js/app.js net::ERR_ABORTED 404 (Not Found)

0👍

Path to yor JS script file is wrong and the browser can’t find it.
Use mix helper to link to your compiled files. [ also you’re missing your styles file. ]
You can’t use <router-view/> in your blade file rather you need an element with id="app" so that vue can mount.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="{{ mix('css/app.css') }}" />
    <title>Document</title>
</head>
<body>
    <div id="app"></div>
    <script src="{{ mix('js/app.js') }}"></script>
</body>
</html>

0👍

change assets path to :

<script src="resources/js/app.js"></script>

or
setup webpack build config

assetsPublicPath: './'

or
vue.config.js:

module.exports = {
    publicPath: '',
}

There is a reloated problem.

Vue CLI build and run index.html file without server

Leave a comment