4

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

aynber
  • 22,380
  • 8
  • 50
  • 63
Özgür Çoban
  • 101
  • 1
  • 1
  • 8

6 Answers6

5

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.

¯_(ツ)_/¯

Özgür Çoban
  • 101
  • 1
  • 1
  • 8
  • 1
    Yes, that's how Vite works. `npm run dev` hosts assets for development use. Nothing will work if it's not running, unless you do `npm run production` to generate permanent assets. – ceejayoz Jul 20 '22 at 21:05
  • Thanks, but npm run production not working :d. says npm ERR! Missing script: "production", same thing with npm run prod – Özgür Çoban Jul 20 '22 at 22:53
  • 1
    Looks like it's `npm run build`. Always check `package.json` for the available commands; looks like they ditched `npm run production`. – ceejayoz Jul 21 '22 at 01:11
  • So simple and so useful, thanks @ÖzgürÇoban – Lucas M. Oliveira Jan 16 '23 at 02:20
0

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

0

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"

Denzel
  • 11
  • 3
  • I wrote npm run dev, and works, but in my old project when i close terminal, project was running well, this time crashes, probably new jetstream version problem. – Özgür Çoban Jul 21 '22 at 12:57
0

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.

KingStevenNOS
  • 119
  • 1
  • 4
0

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
alex toader
  • 2,300
  • 1
  • 17
  • 20
0

instead of using @vite call css and js like this

<link rel="stylesheet" href="{{ asset('/public/build/assets/app.67dcdfd2.css') }}">

<script src="{{ asset('/public/build/assets/app.87a4a3cb.js') }}"></script>

get your CSS and js file from the build folder and replace It