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?
Answers:
you should install (inertia or livewire, not both!)
php artisan jetstream:install inertia //(inertia or livewire, not both!)
try to update composer packages and then reinstall
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
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 😉
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
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
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.
- Install Composer globally (https://getcomposer.org/download/)
- Run –>
composer require laravel/jetstream
- Run –>
php artisan jetstream:install livewire
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?
you should install (inertia or livewire, not both!)
php artisan jetstream:install inertia //(inertia or livewire, not both!)
try to update composer packages and then reinstall
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
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 😉
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
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
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.
- Install Composer globally (https://getcomposer.org/download/)
- Run –>
composer require laravel/jetstream
- Run –>
php artisan jetstream:install livewire