How to Resolve "Vite manifest not found at public/build/manifest.json"【Laravel】
Table Of Contents
- Full Error Message
- Solution (What Actually Fixed It)
- Explanation
- Re-checking the Error on Laravel 13
- "sh: 1: vite: not found" on npm run build
- Dev Server URLs After Building (Leftover public/hot)
- "Unable to locate file in Vite manifest"
- If Node.js is Not Installed
- Reference: Official Documentation
- Conclusion
How to fix "Vite manifest not found at: .../public/build/manifest.json" in Laravel. Why npm run build and npm run dev fix it, plus vite: not found, a leftover public/hot file, and "Unable to locate file in Vite manifest", re-checked on Laravel 13.
I ran into the "Vite manifest not found" error when deploying a Laravel project.
Building with Vite resolved it.
In November 2026, I reproduced the same error on Laravel 13 and re-checked the fix, along with the causes when building does not fix it.
Full Error Message
Vite manifest not found at: /var/www/html/laravel-docker/src/public/build/manifest.json
The error means public/build/manifest.json cannot be found.
The /var/www/html/... part depends on where your project is located.
Solution (What Actually Fixed It)
You can resolve this by building with Vite.
Development Environment
npm run devProduction Environment
npm run buildExplanation
By running these commands, the development environment will stop referencing manifest.json, and in the production environment, manifest.json will be generated, resolving this error.
In the project code, you might see something like this in files such as resources/views/app.blade.php:
@vite(['resources/js/app.js', "resources/js/Pages/{$page['component']}.vue"])This part's output changes depending on whether you run npm run dev or npm run build.
That’s the solution for this issue.
The following is for those who need more detailed instructions.
Re-checking the Error on Laravel 13
Checked in November 2026 with:
- PHP 8.4.27 (Docker php:8.4-cli), Laravel 13.40.0
- Node.js 22.23.4, npm 10.9.9 (Docker node:22), Vite 8.3.6, laravel-vite-plugin 3.2.1
Before building: a 500 error
Right after composer create-project, there is no public/build directory.
A view containing only @vite(['resources/css/app.css', 'resources/js/app.js']) returned status 500 with this error:
Illuminate\Foundation\ViteManifestNotFoundException
Vite manifest not found at: /work/app/public/build/manifest.jsonNote that the default welcome.blade.php in Laravel 13 only outputs @vite when manifest.json or the hot file exists:
@if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot')))
@vite(['resources/css/app.css', 'resources/js/app.js'])
@endifSo the fresh welcome page does not show this error.
It appears on pages where you write @vite without that condition, such as your own layout.
After npm run build: 200
npm run build created public/build/manifest.json and files under public/build/assets/.
The same page returned 200, and @vite produced these tags:
<link rel="preload" as="style" href="http://localhost:8000/build/assets/app-B3GT8ZJD.css" />
<link rel="modulepreload" as="script" href="http://localhost:8000/build/assets/app-BvRk9kiK.js" />
<link rel="stylesheet" href="http://localhost:8000/build/assets/app-B3GT8ZJD.css" />
<script type="module" src="http://localhost:8000/build/assets/app-BvRk9kiK.js"></script>During npm run dev: manifest.json is not used
With public/build removed and npm run dev running, a file named public/hot was created.
It contains only the dev server URL:
http://[::1]:5173While hot exists, @vite outputs tags pointing at the dev server, and the page returned 200 even without manifest.json.
<script type="module" src="http://[::1]:5173/@vite/client"></script>
<link rel="stylesheet" href="http://[::1]:5173/resources/css/app.css" />
<script type="module" src="http://[::1]:5173/resources/js/app.js"></script>public/build is not in Git
The default .gitignore in Laravel 13 contains:
/public/build
/public/hotIf you only deploy the code with Git, public/build will be missing, so you need to run npm run build on the server or upload the built files separately.
"sh: 1: vite: not found" on npm run build
Running npm run build without npm install (no node_modules) printed this and did not build:
> build
> vite build
sh: 1: vite: not foundvite is in the devDependencies of package.json, so run npm install first.
After npm install, npm run build succeeded.
npm install
npm run buildDev Server URLs After Building (Leftover public/hot)
Stopping npm run dev with SIGINT (same as Ctrl+C) removed public/hot.
Force-killing the process (kill -9) left public/hot behind.
With hot left over, @vite kept pointing at the stopped dev server (http://[::1]:5173) even after npm run build created manifest.json.
Since the dev server is stopped, that URL cannot be reached.
Deleting public/hot brought back the tags for the built files.
rm public/hot"Unable to locate file in Vite manifest"
If manifest.json exists but @vite references a file that is not in input in vite.config.js, a different error appeared:
Illuminate\Foundation\ViteException
Unable to locate file in Vite manifest: resources/js/other.js.Adding the file to input and running npm run build again returned 200.
laravel({
input: ['resources/css/app.css', 'resources/js/app.js', 'resources/js/other.js'],
// ...
}),If Node.js is Not Installed
Checking Node.js Version
node -vChecking npm Version
npm -vHow to Install Node
When Using Docker for Environment Setup
In the Laravel project container's Dockerfile, add Node and rebuild.
FROM php:8.3-fpm
~~omitted~~
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
RUN apt-get install -y nodejsdocker compose down
docker compose up -d --build→ How to Set Up Laravel 11 Development Environment Using Docker【with Video】
In Production Environment
For example, with Amazon Linux 2023, installing via NVM can be convenient.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
nvm install --ltsThe NVM version (v0.39.7) is the one current when this article was written in November 2024.
→ How to Deploy Laravel Project to AWS EC2【Amazon Linux 2023 Edition】
Reference: Official Documentation
According to the Laravel 13.x documentation (Asset Bundling (Vite), Running Vite), npm run dev runs the development server for local development, and npm run build versions and bundles the assets so they are ready to deploy to production.
The Advanced Customization section of the same page reportedly lets you change the location of the hot file and the manifest filename, in which case the path in the error message would differ.
Source: Asset Bundling (Vite) - Laravel 13.x
Conclusion
I’ve included a brief example of how to install Node.js. The best approach will vary depending on your environment, but I hope this helps as a reference.




