Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shaungbhone's avatar

Vite manifest not found on Laravel Cloud.

How can I fix manifest.json not found on Laravel Cloud? I know npm run build will work correctly. But on Laravel Cloud. The first command is composer install --no-dev that command run all the things.

  - Installing squirephp/countries (v3.9.0): Extracting archive
  - Installing squirephp/countries-en (v3.9.0): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

In Vite.php line 934:
                                                                                                    
  Vite manifest not found at: /Users/shaungbhone/Herd/testing/public/build/manifest.json  
                                                                                                    

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
1 like
12 replies
shaungbhone's avatar

So, I removed php artisan package:discover --ansi . But I run after npm install. Is that okay or not? idk. lamo. Can someone help me, please?

1 like
b14r's avatar

@shaungbhone Kind of abismal that they shipped a "zero friction" platform that will give me a 500 error when i try to ship their default landing page. Thank you for this reply.

removing /public/build from the .gitignore file also works.

1 like
shaungbhone's avatar

@b14r I would advise against removing /public/build from .gitignore because:

  1. Build Artifacts: These files are generated automatically and should not be version controlled
  2. Repository Bloat: Including build files increases repository size unnecessarily
  3. Merge Conflicts: Can cause frequent conflicts between team members

So I removed php artisan package:discover --ansi and then after npm run build I run it again.

1 like
xasz's avatar

Hello together, i am facing the same issue and i am not sure what is the correct solution here.

Putting the build files up in the repo is not, i think.

Where did u run those commands, in you local repo or on the laravel cloud ?

1 like
vincent15000's avatar

If you can't generate the manifest directly on the server, you need to remove /public/build from .gitignore, generate it locally and push to the repository.

xasz's avatar

@vincent15000 And how do i know If laravel Cloud can Do that ?

I thought this would be Like the basics for the laravel Cloud ?

1 like
vincent15000's avatar

@xasz If Laravel Cloud can do what ?

If you build the manifest locally, then you push it to the repository, and then you pull the whole project to the cloud.

But I didn't notice that it was on Laravel Cloud. I think that Laravel Cloud can build the manifest itself.

Snapey's avatar

Strange issue. I don't get any issue without a build folder, and running php artisan package:discover --ansi

1 like
kamafozilov's avatar

I fixed this by adding npm install before npm run build in the build commands (deployments) section in Laravel Cloud.

Kind of strange that this isn’t included by default, especially since Vite is part of the Laravel starter kit. Maybe they didn’t plan to handle frontend builds out of the box

2 likes
JakeMiller's avatar

Thanks everyone for sharing! Adding npm install before npm run build worked for me too on Laravel Cloud. Surprised it's not default, considering Vite is standard now. By the way, I recently ran into a similar “missing step” issue while working on a digital evidence review for a case at https://www.aftermathinvestigations.com/ It’s amazing how both coding and investigations require you to catch those tiny overlooked details that make all the difference in the final outcome.

1 like

Please or to participate in this conversation.