Vite manifest not found at: public/build/manifest.json
The @vite directive needs public/build/manifest.json, which only exists after npm run build. Run the build on the server or in your deploy.
- Message
- Vite manifest not found at: .../public/build/manifest.json
- Exception
- Illuminate\Foundation\ViteManifestNotFoundException
What it means
The @vite directive turns an entry point such as resources/js/app.js into the versioned file Vite built for it. It looks that up in public/build/manifest.json, which npm run build writes. When the file does not exist, Laravel cannot print a single tag and throws.
Its sibling, "Unable to locate file in Vite manifest: resources/js/charts.js.", is thrown as Illuminate\Foundation\ViteException. The manifest exception extends that class and is marked deprecated in its favour, so catching ViteException covers both errors. Here the manifest exists, but it has no entry for the file you passed to @vite.
Why it happens
- The assets were never built on this server. Laravel's default
.gitignoreexcludespublic/build, so a fresh clone or a deploy that pulls from git does not have it. - The deploy runs
composer installbut has no build step, so the code arrives without its assets. - The file in
@viteis not an entry point.@vitefinds only files that the build put in the manifest, which in practice means the entries in theinputarray of the Laravel plugin invite.config.js. Adding a file to@vitewithout adding it there, or without building again after you did, gives "Unable to locate file in Vite manifest".
A stale public/hot file is a different problem. While that file exists, @vite skips the manifest and points every tag at the dev server address written in it. The Laravel Vite plugin writes the file when npm run dev starts and deletes it when the process exits normally. If the file is left behind or copied to a server, the page still answers 200, but its CSS and JavaScript point at a dev server that is not there, so the page loads without styles or scripts.
How to fix it
Build the assets on the server, or in the step of your deploy that prepares the release:
npm ci
npm run build
Check that the build wrote the manifest where Laravel looks for it:
ls public/build/manifest.json
If you build in CI and upload the result, upload public/build with the release. It is not in git.
For "Unable to locate file in Vite manifest", add the file to the input array in vite.config.js, next to resources/css/app.css and resources/js/app.js, then run npm run build again. Pass the same path to @vite:
@vite(['resources/css/app.css', 'resources/js/app.js', 'resources/js/charts.js'])
For a leftover hot file, delete it on the server:
rm public/hot
Find it in production
Every page whose layout calls @vite answers 500, and with APP_DEBUG=false the visitor sees the plain "Server Error" page. Laravel reports the exception: it is not on the internalDontReport list in the framework's exception handler. Because @vite runs inside a Blade view, storage/logs/laravel.log names Illuminate\View\ViewException with the message, the path of the view, and the Vite exception as the previous exception. A missing build usually takes down the whole site at once, which Ranetrace uptime monitoring notices: it requests the site about every minute and alerts you once the site has been down for two minutes.
Reproduced on Laravel 13.45, PHP 8.5, 5 December 2026.
Related
Read more
Start monitoring today
Websites go down and code throws errors. Ranetrace tells you when it happens to yours, why it matters and what to do next.