laravel 8 installation failed

Question:

i use this command for install laravel + Authentication

composer global require laravel/installer
laravel new laravel--jet

Laravel Installer 4.0.2
but showing this error on cmd:

Which Jetstream stack do you prefer?
  [0] livewire
  [1] inertia
 >

  Aborted.

and i using this commands:

composer create-project --prefer-dist laravel/laravel laravel
composer require laravel/jetstream
php artisan jetstream:install livewire/inertia

but showing this error when run project:

Error
Class 'InertiaInertia' not found

and resource>view folder not contain auth files
how to resolve this problem?

Asked By: Mehdi Jalali

||

Answers:

you should install (inertia or livewire, not both!)

php artisan jetstream:install inertia //(inertia or livewire, not both!)
Answered By: albus_severus

try to update composer packages and then reinstall

Answered By: Marcos Jesus

If you’re using Windows, try using Git Bash…it should come pre-installed on Windows 10. CMD tends to throw that error.

In Git Bash
laravel new project-name –jet

Answered By: Dino Cajic

Try to update laravel installer:

composer global remove laravel/installer
composer global require laravel/installer

To check the version of the installer:

laravel -V

next:

laravel new yourAppName --jet --stack=inertia or livewire

works with cmd or git or any other… good coding 😉

Answered By: epv

Try to update laravel installer:

composer global remove laravel/installer
composer global require laravel/installer
To check the version of the installer:

laravel -V

It seams that the issue only occurs on PowerShell and cmd it works using git bash
Answered By: Narendra

Dear following steps are required in sequence to reach to final output.

//to create project

composer create-project --prefer-dist laravel/laravel checkertracker 

//for generating artisan key

php artisan key:generate

//to include jetstream

composer requrire laravel/jetstream

//to include livewire(which will eliminate your above mentioned error)

php artisan jetstream:install livewire

//open project folder in text editor and go to database/migrations table because you will have login and register screen with jetstream. You can eliminate this table creation step if you want. below is the sample code for table creation you can add or remove the filed as per your requirement its just a sample

//finally, go for it

php artisan serve
Answered By: Ishan K Rajani

If your application is still returning "Class ‘InertiaInertia’ not found" after try to install jetstream livewire, pay attention if your composer is installed globally. If you are using composer just locally in this project with the file composer.phar, will need to install globally in your machine.

After the installation, remove the last migration inserted by JetStream "2023_03_14_184752_create_sessions_table.php" and run command on the prompt again.

  1. Install Composer globally (https://getcomposer.org/download/)
  2. Run –> composer require laravel/jetstream
  3. Run –> php artisan jetstream:install livewire
Answered By: Leonardo Magnani
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.