If your Laravel project works perfectly on your local computer but shows an error like:
Laravel Vite manifest not found on Hostinger at:
.../public/build/manifest.json
after uploading it to Hostinger, you are not alone.
This problem is particularly common when deploying Laravel applications to shared hosting because the local Laravel directory structure and the hosting provider’s public_html structure are often different.
I have also been using Hostinger for my own web projects for years, and I have previously shared my experience with Hostinger web hosting.
The good news is that the error is usually straightforward to fix once you understand what Laravel and Vite are looking for.
In this guide, we will explain:
- What the Vite manifest file is
- Why Laravel shows the “Vite manifest not found” error
- Why the application can work locally but fail on Hostinger
- Where
manifest.jsonshould be located - How to fix the problem using
npm run build - How
publicandpublic_htmlaffect Laravel Vite - What to check when the manifest exists but Laravel still cannot find it
- How to deploy Laravel Vite assets correctly on shared hosting
- Common mistakes that cause the error
- How to troubleshoot the problem step by step
What Is the Laravel Vite Manifest File?
Modern Laravel applications commonly use Vite to compile and bundle frontend assets such as CSS and JavaScript to resolve Laravel Vite manifest not found on Hostinger
For example, a Blade layout may contain:
@vite(['resources/css/app.css', 'resources/js/app.js'])
During development, Laravel can communicate with the Vite development server.
For production, however, your frontend assets need to be compiled.
Laravel’s official documentation recommends using npm run build to compile your frontend assets for production. You can see the current process in the Laravel Vite documentation.
for creating production-ready assets.
After a successful build, Laravel normally has a structure similar to:
public/
└── build/
├── assets/
│ ├── app-xxxxx.css
│ └── app-xxxxx.js
└── manifest.json
The manifest.json file contains information that Laravel uses to locate the generated, versioned CSS and JavaScript files.
So when Laravel reports:
Vite manifest not found at:
.../public/build/manifest.json
it means Laravel cannot find the manifest at the location it expects.
Why Does Laravel Say “Vite Manifest Not Found”?
There are several possible reasons.
The most common ones are:
- You did not run
npm run build. - The
public/builddirectory was not uploaded. manifest.jsonexists on your local computer but not on the server.- The build directory was uploaded to the wrong location.
- Your Laravel
publicdirectory and Hostingerpublic_htmldirectory do not match. - Your Vite configuration uses a custom build directory.
- Laravel is looking at one directory while your compiled assets are in another.
- A deployment process or
.gitignorerule excludedpublic/build.
The important point is that removing @vite from your Blade file is not the real fix.
If you remove:
@vite(['resources/css/app.css', 'resources/js/app.js'])
your page may load, but the compiled CSS and JavaScript may no longer be loaded correctly.
A better solution is to fix the deployment.
Why Does It Work Locally but Fail on Hostinger?
This is one of the most confusing parts of the problem.
On your local computer, your Laravel project may look like:
my-laravel-project/
│
├── app/
├── config/
├── database/
├── resources/
├── routes/
├── storage/
├── vendor/
│
└── public/
└── build/
└── manifest.json
Everything works because Laravel knows where its public directory is.
On shared hosting, however, you may have something like:
/home/user/
│
├── laravel-project/
│ ├── app/
│ ├── config/
│ ├── resources/
│ ├── routes/
│ └── vendor/
│
└── public_html/
├── index.php
├── build/
├── css/
└── js/
Now there is an important difference:
Local:
Laravel project → public/
Hosting:
Laravel project → public_html/
If Laravel still thinks its public directory is:
laravel-project/public/
but your compiled assets are actually inside:
public_html/build/
Laravel may look in the wrong location.
This exact public versus public_html problem appears repeatedly in Hostinger/shared-hosting discussions about Laravel Vite deployments.
If you are still setting up your Laravel project locally, you can also read my guide on How to create a project in Laravel 11
Step 1: Check Whether manifest.json Exists
Before changing your Laravel configuration, check the server.
Look for:
public/build/manifest.json
or, depending on your shared-hosting structure:
public_html/build/manifest.json
The exact location matters.
If you are using Hostinger’s File Manager, open your Laravel project and look for:
build
inside the public-facing directory.
You should find:
build/
├── assets/
└── manifest.json
If manifest.json is missing, don’t change your Blade files yet.
The first thing to do is build the frontend assets.
Step 2: Run npm run build Locally
Open your Laravel project on your development computer.
Run:
npm install
Then:
npm run build
Laravel’s current Vite documentation specifically distinguishes the development command from the production build command:
npm run dev
is for development, while:
npm run build
creates the compiled assets for production.
After the build finishes, check:
public/build/
You should see something similar to:
public/
└── build/
├── assets/
│ ├── app-ABC123.css
│ └── app-XYZ789.js
└── manifest.json
The exact filenames will vary.
Step 3: Upload the Build Directory
Now upload the generated build directory to the correct public location on your server.
For a typical shared-hosting deployment, this might be:
public_html/build/
So the server should eventually contain:
public_html/
├── index.php
├── build/
│ ├── assets/
│ └── manifest.json
The important part is that Laravel’s configured public directory and the actual location of the build directory must agree.
Simply having manifest.json somewhere else on the server is not enough.
Important: Do Not Upload Only manifest.json
You may find suggestions online telling you to create or copy only:
manifest.json
That can hide one part of the error, but it isn’t the proper deployment strategy.
The manifest references the compiled assets.
For example:
build/
├── manifest.json
└── assets/
├── app-ABC123.js
└── app-XYZ789.css
You need the complete production build, not just the manifest.
What If manifest.json Already Exists?
This is where the problem becomes more interesting.
Suppose your server contains:
public_html/build/manifest.json
but Laravel still reports:
Vite manifest not found at:
.../public/build/manifest.json
Look carefully at the error.
Laravel might be searching here:
/home/user/laravel-project/public/build/manifest.json
while your file actually exists here:
/home/user/public_html/build/manifest.json
Those are two different paths.
The error message itself tells you where Laravel is looking.
Compare:
Laravel is looking here:
A/public/build/manifest.json
Your file is here:
B/public_html/build/manifest.json
If A and B are different locations, you have a public-directory configuration problem.
The Most Important Hostinger Concept: public vs public_html
Laravel’s recommended architecture is to serve the application through its public directory.
Laravel’s deployment documentation explicitly recommends configuring the web server to point to the application’s public directory rather than exposing the Laravel project root. This is important because the project root can contain sensitive files.
Shared hosting often uses:
public_html
as the document root.
That creates a deployment difference.
Laravel expects:
laravel-project/public
Shared hosting may expose:
public_html
There are several ways to handle this, depending on the hosting environment.
The important thing is not to randomly move Laravel files around until the error disappears.
First determine which directory is actually being used as the public directory.
Recommended Laravel Vite Deployment Structure
If your hosting configuration allows the domain’s document root to point directly to Laravel’s public directory, that is generally cleaner.
For example:
/home/user/
└── my-laravel-project/
├── app/
├── bootstrap/
├── config/
├── database/
├── resources/
├── routes/
├── storage/
├── vendor/
└── public/
├── index.php
└── build/
├── assets/
└── manifest.json
The web server points to:
my-laravel-project/public
Laravel’s deployment documentation recommends directing web traffic to public/index.php rather than exposing the application root.
What If Hostinger Requires public_html?
If your Hostinger setup uses:
public_html
as the document root, you need to make sure your Laravel application’s public path and Vite build path are consistent with that setup.
This is why blindly following a tutorial written for VPS hosting can cause problems on shared hosting.
A 2026 Laravel 13 shared-hosting deployment guide, for example, specifically addresses the difference between Laravel’s default public directory and shared hosting’s public_html directory, including Vite and public-path configuration.
Check Your vite.config.js
Your Laravel project normally contains:
vite.config.js
A basic Laravel Vite configuration can look like:
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel([
'resources/css/app.css',
'resources/js/app.js',
]),
],
});
Laravel’s official documentation shows this general structure for configuring the Laravel Vite plugin.
If you have changed the build directory, check that configuration carefully.
For example, Laravel supports custom build directories when the backend and Vite configuration agree about the location.
Check Your Blade @vite Directive
Your Blade layout may contain:
@vite(['resources/css/app.css', 'resources/js/app.js'])
This is normally correct.
Do not remove it just because you received:
Vite manifest not found
The @vite directive is responsible for loading the appropriate development or production assets.
Laravel’s current documentation states that @vite detects the development server during development and loads compiled/versioned assets in build mode.
So the better question is:
Why can’t Laravel find the production build?
rather than:
How can I remove
@vite?
Common Mistake: npm run dev Instead of npm run build
Another common mistake is running:
npm run dev
and then uploading the Laravel project to production.
npm run dev starts the Vite development server.
For a production deployment, you normally need:
npm run build
Laravel’s official documentation specifically recommends the build command for compiling assets for production.
So your deployment workflow should generally be:
Make changes locally
↓
npm install
↓
npm run build
↓
Deploy Laravel application
↓
Upload public/build
↓
Test production website
Common Mistake: build Directory Is Missing From the Upload
Sometimes everything works locally because:
public/build/
exists on the developer’s computer.
But the deployment package does not contain it.
Then production receives:
public/
└── index.php
instead of:
public/
├── index.php
└── build/
├── assets/
└── manifest.json
The result is:
Vite manifest not found
There are also cases where the build directory is excluded from Git or another deployment process, so the production server never receives it. This issue has appeared in community troubleshooting around Laravel Vite deployments.
Common Mistake: Uploading the Build Folder to the Wrong Directory
Imagine your Laravel project is:
/home/user/myapp/
and you upload:
/home/user/public_html/build/
but Laravel is configured to look at:
/home/user/myapp/public/build/
Laravel won’t magically discover the other copy.
The error may continue even though you can see manifest.json in File Manager.
Always compare:
PATH IN ERROR
with:
ACTUAL PATH OF manifest.json
That simple comparison solves many deployment problems.
What If You Have SSH Access?
If your hosting account provides SSH access, troubleshooting becomes much easier.
From your Laravel project directory, you can check:
ls -la public/build
Then:
ls -la public/build/manifest.json
If the file exists, you can inspect the actual location.
You can also check the production directory:
pwd
and compare it with the path shown in the Laravel error.
This can immediately tell you whether Laravel is using the directory you expect.
Check the Laravel Version and PHP Version
If you’re deploying a modern Laravel project, don’t only look at Vite.
Also check your PHP version.
Laravel 13’s current deployment documentation lists PHP 8.3 or higher as a server requirement.
You can check your PHP version with:
php -v
For example:
PHP 8.4.x
If your Laravel version requires a newer PHP version than your hosting environment provides, you can run into completely different deployment problems.
So always verify:
Laravel version
PHP version
Node version
npm version
before troubleshooting frontend assets.
A Practical Laravel + Hostinger Deployment Checklist
Before uploading a Laravel application to shared hosting, check the following.
Laravel
✓ .env configured
✓ APP_ENV=production
✓ APP_DEBUG=false
✓ APP_URL configured
✓ Database credentials configured
✓ Composer dependencies installed
Vite
✓ npm install completed
✓ npm run build completed
✓ public/build exists
✓ public/build/manifest.json exists
✓ build/assets exists
Hosting
✓ Correct PHP version
✓ Correct document root
✓ Correct public directory
✓ Correct permissions
✓ storage writable
✓ bootstrap/cache writable
Laravel’s deployment documentation also highlights the need for Laravel to be able to write to storage and bootstrap/cache.
If your Laravel application also needs to send emails from shared hosting, you may find my guide on Laravel Brevo Email Integration Using API Key useful.
Quick Fix for the Most Common Case
If you have just uploaded a Laravel application to Hostinger and receive:
Vite manifest not found at:
.../public/build/manifest.json
start with this:
npm install
npm run build
Then verify locally:
public/build/manifest.json
After that, upload the complete:
build/
directory to the public directory used by your Laravel application.
Do not delete the @vite directive simply to hide the error.
Why Removing @vite Is Not a Good Permanent Fix
You may find an online answer suggesting:
{{-- @vite(['resources/css/app.css', 'resources/js/app.js']) --}}
or simply deleting:
@vite(...)
This can make the manifest exception disappear because Laravel no longer tries to load the Vite manifest.
But it can also remove your compiled CSS and JavaScript.
For a production Laravel application, that is usually not what you want.
The correct solution is to make the production assets available where Laravel expects them.
What If the Error Still Appears After npm run build?
If you have already run:
npm run build
and uploaded:
build/
but the error remains, don’t keep rebuilding blindly.
Check these three things:
1. Where is Laravel looking?
Read the complete error:
Vite manifest not found at:
...
2. Where is manifest.json?
Find the actual file:
.../build/manifest.json
3. Do those paths match?
If not, investigate your public-directory configuration.
This is especially important on shared hosting because public and public_html may represent different directories.
Final Example
Suppose your production server contains:
/home/user/myapp/
├── app/
├── config/
├── resources/
├── routes/
├── vendor/
└── public/
└── build/
├── assets/
└── manifest.json
and your web server points to:
/home/user/myapp/public
Then Laravel’s normal Vite setup can find:
public/build/manifest.json
But if your server instead contains:
/home/user/myapp/
├── app/
├── config/
├── resources/
├── routes/
└── vendor/
/home/user/public_html/
├── index.php
└── build/
└── manifest.json
while Laravel still thinks the public directory is:
/home/user/myapp/public
you have a path mismatch.
That’s the situation you need to fix—not the Blade @vite directive itself.
Conclusion
The “Vite manifest not found” error on Hostinger usually isn’t a Laravel bug.
It normally comes down to one of three things:
1. Vite assets were never built
OR
2. public/build was not uploaded
OR
3. Laravel and Hostinger disagree about the public directory
The first thing to check is:
public/build/manifest.json
If it doesn’t exist, run:
npm run build
If it exists somewhere else, compare that location with the path shown in the Laravel error.
For shared hosting, pay particular attention to the difference between:
Laravel:
public/
and:
Hostinger:
public_html/
Once those paths are correctly aligned, the Vite manifest not found error should disappear and your compiled CSS and JavaScript can load normally.
Frequently Asked Questions
Why does Laravel say Vite manifest not found?
Laravel cannot find the compiled Vite manifest at the path it expects. The most common causes are a missing production build, missing public/build directory, or a mismatch between the Laravel public directory and the hosting document root.
How do I fix Vite manifest not found in Laravel?
Run:
npm install
npm run build
Then make sure the resulting build directory, including manifest.json and the assets directory, is deployed to the correct public directory.
Where should manifest.json be in Laravel?
With the default Laravel Vite configuration, it is normally generated under:
public/build/manifest.json
The exact location can be customized when using a custom Vite build directory.
Does Laravel Vite work on Hostinger shared hosting?
Yes, Laravel applications using Vite can be deployed to shared hosting, but the production assets need to be built and the Laravel public directory needs to be configured correctly for the hosting environment. Current community discussions show this remains a common deployment issue on Hostinger/shared hosting.
Should I remove @vite to fix the error?
No. Removing @vite may hide the manifest error but can prevent your compiled CSS and JavaScript from loading. Fix the production build and public-directory configuration instead.
Conclusion:- I hope this tutorial will help you to understand the overview.