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

digitalwing's avatar

Vite manifest not found at: /var/www/html/project_name/public/build/manifest.json

After configuring Auth

php artisan ui bootstrap php artisan ui bootstrap --auth

and successfully running php artisan serve and taking the link in browser an error appers.

Exception Vite manifest not found at: /var/www/html/green_apple/public/build/manifest.json

Start the development server Run npm run dev in your terminal and refresh the page.

Also tried npm run dev - which resulted in following out put Laravel Mix v6.0.49 Compiled Successfully in 2654ms webpack compiled successfully

But the error still persists. what might be the reason? Laravel Framework 9.52 PHP 8.1.16

0 likes
9 replies
LaryAI's avatar
Level 58

The error message suggests that the Vite manifest file is missing. This file is generated by Vite during the build process and contains information about the generated assets.

To fix this issue, you need to run the npm run dev command to generate the manifest file. Make sure you are running this command in the root directory of your project.

If the command runs successfully and the manifest file is generated, you should be able to refresh the page and see your application.

If you are still experiencing issues, try clearing your browser cache and restarting your development server.

npm run dev
CamKem's avatar

Sound like you have Laravel Mix installed and not Vite, a fresh install of Laravel 9 should be using Vite as a default. You have to look into upgrading form Mix to Vite if it's an existing application that you have upgraded to laravel 9.

2 likes
AliHaidar's avatar

@CamKem sir i also have error i question it but now i do not know where can i check the reply(mean answer) of the others .

digitalwing's avatar

@camkem How can I check if Laravel has Mix or Vite? How to upgrade from Mix to Vite or make it default?

CamKem's avatar

@digitalwing You need to look at your package.json file in your project folder. The current one I am working on looks like this (you can see vite in "scripts, which correspond to the available options when you run the command "npm run" in your terminal "):

{
    "private": true,
    "scripts": {
        "dev": "vite",
        "build": "vite build && vite build --ssr"
    },
    "devDependencies": {
        "@inertiajs/vue3": "^1.0.0",
        "@tailwindcss/forms": "^0.5.3",
        "@vitejs/plugin-vue": "^4.0.0",
        "@vue/server-renderer": "^3.2.31",
        "autoprefixer": "^10.4.14",
        "axios": "^1.1.2",
        "laravel-vite-plugin": "^0.7.2",
        "postcss": "^8.4.18",
        "prettier": "^2.8.6",
        "prettier-plugin-tailwindcss": "^0.2.5",
        "sass": "^1.59.3",
        "tailwindcss": "^3.2.1",
        "vite": "^4.0.0",
        "vue": "^3.2.41"
    },
    "dependencies": {
        "@digitalocean/do-markdownit": "^1.5.1",
        "@fortawesome/fontawesome-svg-core": "^6.3.0",
        "@fortawesome/free-brands-svg-icons": "^6.3.0",
        "@fortawesome/free-regular-svg-icons": "^6.3.0",
        "@fortawesome/free-solid-svg-icons": "^6.3.0",
        "@fortawesome/vue-fontawesome": "^3.0.3",
        "@headlessui/vue": "^1.7.12",
        "@heroicons/vue": "^2.0.16",
        "@inertiajs/inertia": "^0.11.1",
        "@inertiajs/inertia-vue3": "^0.6.0",
        "highlight.js": "^11.7.0",
        "lodash": "^4.17.21",
        "markdown-it": "^13.0.1",
        "markdown-it-abbr": "^1.0.4",
        "markdown-it-anchor": "^8.6.7",
        "markdown-it-deflist": "^2.1.0",
        "markdown-it-emoji": "^2.0.2",
        "markdown-it-footnote": "^3.0.3",
        "markdown-it-highlightjs": "^4.0.1",
        "markdown-it-icons": "^0.4.1",
        "markdown-it-ins": "^3.0.1",
        "markdown-it-mark": "^3.0.1",
        "markdown-it-strikethrough-alt": "^1.0.0",
        "markdown-it-sub": "^1.0.0",
        "markdown-it-sup": "^1.0.0",
        "markdown-it-task-lists": "^2.1.1",
        "nprogress": "^0.2.0",
        "pinia": "^2.0.33",
        "vue3-markdown-it": "^1.0.10"
    }
}
digitalwing's avatar

@CamKem

{ "scripts": { "scss": "node-sass resources/scss -o css", "dev": "npm run development", "development": "mix", "watch": "mix watch", "watch-poll": "mix watch -- --watch-options-poll=1000", "hot": "mix watch --hot", "prod": "npm run production", "production": "mix --production"

}

}

This is the scripts portion. As you told it looks like Mix. How can I upgrade to vite?

itwonders.team@gmail.com's avatar

may run npm run build once to have the manifest.json get generated in the public folder. After that, npm run dev should be working

2 likes
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.

Happy coding! šŸš€

Please or to participate in this conversation.