Laravel mix() fails with 'The Mix manifest does not exist'
The Mix manifest does not exist.Short answer
The mix() helper reads mix-manifest.json to find the hashed asset name, and that file only appears after Mix has compiled your assets. Run npm install and npm run dev or prod. If the file exists, the path you pass to mix() must match an output path in webpack.mix.js exactly.
Fix it fast
1Find out which cause you have
Look for the manifest, and compare what it lists with what the Blade view asks for.
find . -name mix-manifest.json -not -path "./node_modules/*" grep -rn "mix(" resources/views | head2Match what you see, then jump to its fix
What does the error look like?
The Mix manifest does not exist.
Cause 1 of 2
Assets were never compiled on this machine
1Check
The manifest is a build output. A fresh clone, or a deploy that ignores compiled files, does not have it. Check whether node_modules exists too.
ls node_modules | head -n 3
grep -n '"scripts"' -A8 package.json2Fix
Install the Node dependencies and run the build script. npm run dev builds for development, npm run prod minifies.
npm install
npm run prod3Verify
The manifest exists and lists your files.
find . -name mix-manifest.json -not -path "./node_modules/*"Confirmed by laravel.com
Cause 2 of 2
The path in mix() is not one Mix produced
1Check
mix() looks the unhashed path up in the manifest. If webpack.mix.js writes to public/css/site.css, then mix('/css/app.css') has nothing to find.
grep -n "mix\." webpack.mix.js
grep -rn "mix(" resources/views2Fix
Pass the same output path that webpack.mix.js writes, with a leading slash, relative to public.
// webpack.mix.js
mix.js('resources/js/app.js', 'public/js')
.postCss('resources/css/app.css', 'public/css');
{{-- Blade --}}
<link rel="stylesheet" href="{{ mix('/css/app.css') }}">
<script src="{{ mix('/js/app.js') }}"></script>3Verify
Rebuild, then load a page that uses the helper.
npm run prod
find . -name mix-manifest.json -not -path "./node_modules/*" -exec cat {} +Confirmed by laravel-mix.com
How do I stop it coming back?
- Build assets in CI or in the deploy script, not by hand on the server.
- Keep the output paths in webpack.mix.js and the mix() calls in one place so they cannot drift.
- Commit package-lock.json so npm install gives the same build everywhere.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- WorkforceA field app, an admin console and a self-hosted Node.js server for push and reconciliation.
- Spotless LaundryAn on-demand laundry app: Flutter on a Laravel back end, with Firebase for live updates.
Related fixes
Back end
Laravel says Vite manifest not found at public/build/manifest.json
Vite manifest not found at: /var/www/app/public/build/manifest.json
Laravel's @vite directive looks for a running dev server first, then for a built manifest file.
3 causes, each with a fixBack end
Laravel mix() throws Unable to locate Mix file
Unable to locate Mix file: /css/app.css.
This error means mix-manifest.json exists but has no entry for the path you passed to mix().
4 causes, each with a fixBack end
npm run production fails in Laravel Mix with an unknown --hide-modules option
Unknown argument: --hide-modules
The scripts in your package.json were written for Mix 5, which called webpack directly with flags such as --hide-modules.
3 causes, each with a fixBack end
Laravel npm run dev says the mix command was not found
Command "mix" not found when running npm run dev
The mix program comes from the laravel-mix package.
3 causes, each with a fixBack end
Browser does not reload when I save a Blade file under Vite
CSS and JavaScript hot update, but view changes need a manual refresh
Vite only reloads the page for Blade files when the Laravel plugin's refresh option is on.
3 causes, each with a fixBack end
npm run dev in Laravel cannot find vite.js
npm run dev exits right after starting, with a module error
The dev script runs the vite command from node_modules.
3 causes, each with a fix