And have you pushed your public/js/app.js file to the repo or you have the directory in your .gitignore file?
Dec 12, 2020
8
Level 1
Unable to locate Mix file: /js/app.js.
When i'm deploying my site to Laravel Forge, it give me an error saying "Unable to locate Mix file" . locally is fully working...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="manifest" href="/manifest.json" />
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<noscript>To run this application, JavaScript is required to be enabled.</noscript>
<meta name="theme-color" content="#FFFFFF" />
</script>
<title>Kollapp</title>
</head>
<body>
<div id="app">
<app></app>
</div>
<script src="{{ mix('/js/app.js') }}"></script>
</body>
</html>
my mix-manifest:
{
"/js/app.js": "/js/app.js"
}
Webpack.mix.js
const mix = require('laravel-mix');
const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin')
new SWPrecacheWebpackPlugin({
cacheId: 'Kollapp',
filename: 'service-worker-cache.js',
staticFileGlobs: ['dist/**/*.{js,css}', '/'],
minify: true,
stripPrefix: 'dist/',
dontCacheBustUrlsMatching: /\.\w{6}\./
})
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel applications. By default, we are compiling the CSS
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/js/app.js', 'public/js').vue();
Please or to participate in this conversation.