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

cyber_dev's avatar

Laravel-9: Vite manifest not found at: \public\/build/manifest.json

Laravel-9: Vite manifest not found at: \public/build/manifest.json

Hello i just installed laravel breeze and tried to run it but it showed this error:

  Vite manifest not found at: ...\public\/build/manifest.json

by searching this error i tried different answers but nothing works like:

  npm run build, npm run serve

but it gives this error:

     Missing script: "build"
      npm ERR!
     npm ERR! To see a list of scripts, run:
     npm ERR!   npm run
     npm ERR! A complete log of this run can be found in:
     npm ERR!     C:\Users\umar\AppData\Local\npm-cache\_logs22-07-17T08_18_43_641Z-debug.log

this is the manifest.json file

  {
      "/js/app.js": "/js/app.js",
      "/css/app.css": "/css/app.css"
  }
0 likes
42 replies
cyber_dev's avatar

@Sinnbeck Vite manifest not found at: D:\xampp\htdocs\laravel\practice\public/build/manifest.json

1 like
cyber_dev's avatar

@Sinnbeck simply by installing xampp, composer and than installing laravel (after setting path in environment variables), followed these commands:

  composer create-project laravel/laravel practice

  cd practice

  php artisan serve
Sinnbeck's avatar

@cyber_dev try stopping the serve command, run npm install, then npm run dev, and start the serve command again

1 like
cyber_dev's avatar

@Sinnbeck sorry it gave the same error even i deleted the previous version and installed the latest version but same error as above

Sinnbeck's avatar

@cyber_dev seems that it's having some issues resolving a windows path. Sadly I don't own a windows computer, so I cannot test it out myself

Hopefully someone else has a windows computer where it works

technoigniters's avatar

@Sinnbeck Your solution did not help me. I am still getting error "Vite manifest not found at: /Applications/MAMP/htdocs/laravelproject/public/build/manifest.json". Any solution? If there is no solution then please suggest me how can I setup it without Vite? Thanks a lot.

thinkverse's avatar

Did you follow the installation instructions for Laravel Breeze?

composer require laravel/breeze

Use the following command to get the necessary files installed on your project.

php artisan breeze:install

Now you can install the node packages that you will need, like vite, tailwindcss, axios etc...

npm install

When the node dependencies are installed you can start the vite development server.

npm run dev

That will create the manifest.json file for you during the time the vite development server is up.

To have a persistent manifest.json you'll have to produce that with an asset build.

npm run build

And those are the only two script commands that come with Laravel now, dev and build.

6 likes
cyber_dev's avatar

@thinkverse @sinnbeck yes i installed it from there but when i used npm run (on newely installed node) then it shows this command at top:

  npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead
thinkverse's avatar

@cyber_dev This message is shown on new versions of npm when you're trying to install something globally with the -g flag instead of the newer --global flag. Seems to be an issue on Windows where the npm binary has -g inside it. This Stackoverflow answer seems to be a popular solution for it.

cyber_dev's avatar

@thinkverse i reinstalled new version of composer and nodejs and now it shows:

    https://paste.ofcode.org/c5RSV6JrTAPEJNjjTAYyxW

  Your requirements could not be resolved to an installable set of packages.

  Problem 1

      - laravel/breeze[v1.11.0, ..., v1.11.1] conflict with laravel/framework <9.19.0.
  - laravel/breeze 1.x-dev requires illuminate/console ^9.21 -> found illuminate/console[v9.21.0, ..., 9.x-dev] 
  but these were not loaded, likely because it conflicts with another require.
  - laravel/framework is locked to version v9.8.1 and an update of this package was not requested.
  - Root composer.json requires laravel/breeze ^1.11 -> satisfiable by laravel/breeze[v1.11.0, v1.11.1, 1.x-dev].

  You can also try re-running composer require with an explicit version constraint, e.g. "composer require 
  laravel/breeze:*" to figure out if any version is installable, or "composer require laravel/breeze:^2.1" if you 
  know which you need.

  Installation failed, reverting ./composer.json and ./composer.lock to their original content.
thinkverse's avatar

@cyber_dev Your laravel/framework is locked at v9.8.1 but Laravel Breeze as of v1.11.0 requires Laravel Framework >9.19.0. You have two options, downgrade breeze to a specific version.

composer require laravel/breeze:1.10.0

Or a better solution would be to update your Laravel Framework version.

composer require laravel/framework:^9.19

Or an even better solution than that is to look at Laravel 9's composer.json and see if yours matches, or is outdated. And if it is, remove your composer.lock file and copy over the require and require-dev dependencies that don't match versions.

1 like
ashrafshovo's avatar

@thinkverse I tried both solution, but it went in vain on Laravel 9.23.0. Would you help me to solve the issue?

clem's avatar

If the manifest.json file does exist but you're still seeing this error, make sure the permissions are good:

sudo chown www-data:www-data -R public/build/
sudo chmod g+w -R public/build/
massel's avatar

@cyber_dev Hello Please do a fresh laravel install without breeze

then follow steps

  1. npm install
  2. npm run build

It worked for me

1 like
logudotcom's avatar

@massel It worked for the below error:

Vite manifest not found at: D:\laragon\www\source\public\build/manifest.json

ATiM's avatar

I had the same problem.

I updated the node version to 16 then npm install and npm run dev And for server php artisan serve

thinkverse's avatar

@ATiM Do you use the vue option? I do know that Vue 3 requires Node 16+. I've tested the Blade stack with Node ^14.18.1 and ^16. I know Node 15 doesn't work since Vite doesn't support it.

ATiM's avatar

@thinkverse

No I don't use vue.

Btw by updating the node version my problem resolved

Alewa's avatar

run npm update, after run composer update and finally run npm install && npm run dev

gemlit's avatar

!!! Answer is : Install git bash for Windows , and go to directory ptoject>>>>>click mause 2 on directory and select "git bash here" >>> after that u can run: "npm install && npm run dev" on your Git Bash window.

1 like
saamretep's avatar

For production: make sure that you check your .gitignore file as /public/build is excluded while it needs the build directory:

/public/build 

to exclude you can do this

!/public/build
2 likes
Scratch's avatar

@saamretep indeed, this one gets you everytime if you build time compile and not build script on deploy

larasoft_io's avatar

Hy , sorry for the late comment :

if you facing this issue , you can run these command on terminal

-> npm install --save-dev vite laravel-vite-plugin

Then you need to update your package.json file

"scripts": { "dev": "vite", "build": "vite build" }

Finally, you can trigger this command below to build Vite and create the manifest file.

-> npm run build

your problem is solved, Boom!!!!

24 likes
abdullah3's avatar

@larasoft_io I am new in Laravel and I suffered a lot from this issue Praise be to God, who made it easy for you to solve it And I must not forget to thank you :)

sahudinesh50's avatar

Works for me - Added in package.json "scripts": { "dev": "vite", "build": "vite build" } and "devDependencies" : { "vite": "^4.0.0" } then run commands npm install , npm i laravel-vite-plugin, npm run dev

itxshakil's avatar

Hey there!

It looks like you're encountering the "Vite manifest not found" issue in Laravel after configuring Auth and running npm run dev. This can be a bit tricky, but I'll break it down for you.

The error message you're seeing indicates that Laravel is having trouble finding the Vite manifest file. This file is essential for managing your website's assets. Don't worry; we have a few steps to try to fix this.

First, let's address why this might be happening. Laravel switched from using "Mix" to "Vite" in version 9.19, and this transition can sometimes lead to manifest file issues.

Here are some steps to resolve the problem:

  1. Fixing it on the Development Server: If you're working on your development server (where you test your website), open your terminal and run these two commands:

    npm install
    npm run dev
    

    This should make your website's assets and manifest files behave as they should.

  2. Fixing it on a Production Server with SSH: If you're on a production server with SSH access, you can still fix it. Run the following command in your terminal:

    npm install && npm run build
    

    This should also get your manifest file and assets in order.

  3. Fixing it on a Production Server without Fancy Stuff: If your production server doesn't have npm, you have a couple of options:

    • You can manually upload the "build" folder using FTP or CPanel File Manager. Think of it like sending a package in the mail.

    • Alternatively, you can tell Git to keep an eye on the "build" folder. Remove it from the ".gitignore" file, and Git will start tracking it. Just remember not to overload Git with frequent changes. Only commit the "build" folder when you're finishing a significant project or releasing the final version.

In a nutshell, these steps should help you fix the "Vite manifest not found" issue in Laravel. It might seem a bit complex, but with some practice, you'll become a web development pro!

If the error persists even after trying these steps, let's make sure your Laravel version (9.52) and PHP version (8.1.16) are compatible with the Vite setup. It's always a good idea to ensure your Laravel and Vite versions are in sync.

Remember, if you have any more questions or run into further issues, feel free to ask for help. Happy coding! 🚀

Inosh's avatar

Laravel-9: Vite manifest not found at: /public/build/manifest.json

When I face this problem today. So I try this path. My problem is solved. If you face this problem try this one.

adding "type": "module" to the nearest package.json renaming vite.config.js/vite.config.ts to vite.config.mjs/vite.config.mts

hanis-sf's avatar

@Inosh i tried this but my manifest.json is in /public/build/.vite/manifest.json. Im using Laravel 11. And got the same error which /public/build/manifest.json not found. It happened in production only. In my local is fine

sm0ck1's avatar

@hanis-sf I deleted "manifest: true" parameter in vite.config.js and it helped for me

NahilK's avatar

Make sure you have run the following command first. npm install Then run npm run dev command it will work well.

1 like

Please or to participate in this conversation.