Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

When running a project, getting the error message "Unable to locate file in Vite manifest..." #351

Closed
manfredekblad opened this issue Jul 20, 2022 · 6 comments

Comments

@manfredekblad
Copy link

Describe the bug
When running a project, and opening it in the browser, it shows an exception "Unable to locate file in Vite manifest: resources/css/app.css".

To Reproduce
Steps to reproduce the behavior:

  1. Generate the code
  2. Run the project and open in browser, go to the login page
  3. It shows the error message

Expected behavior
Expecting the login page to load properly without exceptions or other errors

Screenshots
https://www.loom.com/share/53c80fd9f7b24c5bab78f0298093097c

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version: 1.1.8

Additional context
If I manually run "nmp run dev" while also serving the project ("php artisan serve"), I can make the page load properly. You can see this in the Loom-video.

@manfredekblad
Copy link
Author

after running "npm run build" the manifest json has double backslack on the app.css path - see screenshot

if i manually change that to single forward slash and refresh in browser, it loads ok

image

@TiagoSilvaPereira
Copy link
Owner

Hi @manfredekblad seems it is a bug with Vite when using Laravel + Jetstream. I tested here and the problem happens even with projects created out of Vemto. I already opened an issue on the Jetstream repository:

laravel/jetstream#1098

@TiagoSilvaPereira
Copy link
Owner

Vite already fixed this bug

@mtkumar82
Copy link

Hi getting error
Unable to locate file in Vite manifest: resources/js/app.jsx.
in laravel10, I have below code in blade file, Please help how to resolve this issue?

    <title inertia>{{ config('app.name', 'Laravel') }}</title>

    <!-- Fonts -->
    <link rel="stylesheet" href="https://fonts.bunny.net/css2?family=Nunito:wght@400;600;700&display=swap">

    <!-- Scripts -->
    @routes
    @viteReactRefresh
    @vite(['resources/js/app.jsx', "resources/js/Pages/{$page['component']}.jsx"])
    @inertiaHead
</head>
<body class="font-sans antialiased">
    @inertia
</body>

@TiagoSilvaPereira
Copy link
Owner

@mtkumar82 is this a project generated by Vemto?

@Jagdish-J-P
Copy link

Hi getting error Unable to locate file in Vite manifest: resources/js/app.jsx. in laravel10, I have below code in blade file, Please help how to resolve this issue?

``` <title inertia>{{ config('app.name', 'Laravel') }}</title> <!-- Fonts --> <link rel="stylesheet" href="https://fonts.bunny.net/css2?family=Nunito:wght@400;600;700&display=swap"> <!-- Scripts --> @routes @viteReactRefresh @vite(['resources/js/app.jsx', "resources/js/Pages/{$page['component']}.jsx"]) @inertiaHead </head> <body class="font-sans antialiased"> @inertia </body> ``` ![](https://storage.googleapis.com/pieces-web-extensions-cdn/pieces.png)Copy and Save![](https://storage.googleapis.com/pieces-web-extensions-cdn/link.png)Share

Have you ever been find solution for this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants