JETSTREAM "Unable to locate file in Vite manifest: resources/css/app.css." ERROR

Viewed 2285

firstly i want to explain how I`m install laravel and jetstream.

I open a folder from c disk, and i am goes to this folder from cmd and I start to write these codes

laravel new project --jet, it ask to me livewire or inertia, I say livewire,

It building project and I migrate my database on xamp. I can reach this screen.

enter image description here

As you can see there is a login button from top right, when I click this button this screen comes out.

enter image description here

And these are files from installation.

enter image description here

Also I have a laravel project with jetstream, when i start server with this project it works well. But I can not install jetstream with new project.

I`m a new with this world, please help me. Thanks a lot

5 Answers

I found something interesting.

I write npm run dev on a different terminal from project folder. Jetstream starts working, when I close terminal which is I wroten npm run dev, jetstream crashs again.

¯_(ツ)_/¯

Try

composer require laravel/breeze:1.11.1

instead of

composer require laravel/breeze

Maybe the version of breeze in laravel should be specific. I've tried that and it works

I think this might help... Once you install the laravel application and implement the jetstream livewire, run the following commands:

  1. php artisan migrate -- to migrate the tables.
  2. npm install
  3. npm run dev
  4. php artisan serve

These should clear the error "Unable to locate file in Vite manifest:resources/css/app.css"

The error occurs because while compiling the assets the Manifest.json file inside the public/build folder has a small typo in the directories. You may find that instead of resources/css/app.css it would be written as:

resources/css\\app.css

Just change it back to 'resources/css/app.css' and you will be fine. All the assets were compiled successfully.

For me it works only when I run

npm run dev

and I let it run in the background. If I stop it, I am getting the same error.

Or if you dont want to let it run (like in a production env), you run

npm run build
Related