Auth is not creating in laravel 8 - laravel

i use this command
composer require laravel/ui
to make auth in laravel:8 but it gives the following error:
Using version ^3.3 for laravel/ui
./composer.json has been updated
Running composer update laravel/ui
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/ui[v3.3.0, ..., 3.x-dev] require illuminate/console ^8.42 -> found
illuminate/console[v8.42.0, ..., 8.x-dev] but these were not loaded, likely because it
conflicts with another require.
- Root composer.json requires laravel/ui ^3.3 -> satisfiable by laravel/ui[v3.3.0, 3.x-dev].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

First of all you should update all your packages of php using this command:
composer update
after this try with the install of laravel/ui:
composer require laravel/ui
execute one of them :
// Generate login / registration scaffolding...
php artisan ui bootstrap --auth
php artisan ui vue --auth
php artisan ui react --auth
finally
npm install

You can Update manually composer.json file
"laravel/framework": "^8.12",
"laravel/tinker": "^2.5",
"laravel/ui": "^3.0",
Then run composer update Command

Related

What is the error I am making when I'm installing the passport dependencies?

Using version ^10.1 for laravel/passport
./composer.json has been updated
Running composer update laravel/passport
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/passport[v10.1.0, ..., 10.x-dev] require illuminate/auth ^8.2 -> found illuminate/auth[v8.2.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires laravel/passport ^10.1 -> satisfiable by laravel/passport[v10.1.0, v10.1.1, v10.1.2, 10.x-dev].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
you must check your project dependencies and laravel dependencies , you can test this remove composer.lock file and run this composer install
You need to upgrade your Laravel or install an older version of Laravel Passport
composer require laravel/passport:X.x.x

ovh/ovh requires guzzlehttp^6.0 while therobfonz/laravel-mandrill-driver requires guzzlehttp^7.0: is there any solution?

In my Laravel 8 project I had to install the mailer therobfonz/laravel-mandrill-driver; now I have to install the SMS driver ovh/ovh.
For the moment in my composer.json file I have:
"guzzlehttp/guzzle": "^7.0",
"therobfonz/laravel-mandrill-driver": "^3.0"
When I type: composer require ovh/ovh, I have this error:
ovh/ovh v2.1.0 requires guzzlehttp/guzzle ^6.0 -> found guzzlehttp/guzzle[6.0.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.0).
I have tried to edit composer.json by changing the version of guzzle to "^6.0", then doing composer update. However this results in an error (mandrill requires guzzle ^7.0).
What could I do?
OVH v3.0.0 works with Guzzle 7.0
https://github.com/ovh/php-ovh/blob/75852ad0fee8008b6245d72a7d3ba7f09cb456ae/composer.json
Maybe you should just update OVH?

laravel new blog not work mockery/mockery 1.4.0

Today I wanted to create a new project with Laravel with this command
laravel new blog
But I get this error
Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for mockery/mockery 1.4.0 -> satisfiable by mockery/mockery[1.4.0].
- mockery/mockery 1.4.0 requires php ^7.3.0 -> your PHP version (7.2.23) does not satisfy that requirement.
Why should php7.3 be read when Laravel himself says at least php7.2.5 ???
Run composer update.
The reason:
Your PHP version is too low. You've got 7.2.23 installed, and mockery/mockery 1.4 requires 7.3.0
The best solution is to upgrade your PHP version. Alternatively, you can reduce mockery's version to 1.3.1, which only requires PHP 5.6 or above.
My bug report can be found here
As of 2020-05-21, the zip files that laravel new ___ uses will try to install mockery/mockery version 1.4. This won't work with versions of PHP below 7.3. In order to fix this, run composer update, and mockery will be downgraded to a compatible version.
I had the same problem today for new Laravel projects. The composer.json file was showing "mockery/mockery": "^1.3.1" but still was showing the same error. Delete also the composer.lock file and run composer install.
Assuming you are trying to create a new laravel project called blog this is what I did to fix the error after running laravel new blog
cd into blog
run composer update
Create a .env file. You can just make a copy of .env.example and rename the copy to .env. In case you try to start the dev server using php artisan serve and the app launches with a 500 error, run these commands:
php artisan key:generate
php artisan cache:clear
php artisan config:clear
composer dump-autoload
I had the problem when trying to create new Laravel applications,I updated php version using the following commands and it worked.
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt install -y php7.4 php7.4-gd php7.4-mbstring php7.4-xml
Delete the composer.lock file and run composer again
composer install
You can just run
composer create-project --prefer-dist laravel/laravel <project_name>
It'll automatically fall-back to mockery^1.3.1
I also faced these problems.
Problem 1
- Installation request for facade/ignition-contracts 1.0.2 -> satisfiable by facade/ignition-contracts[1.0.2].
- facade/ignition-contracts 1.0.2 requires php ^7.3|^8.0 -> your PHP version (7.2.34) does not satisfy that requirement.
Problem 2
- Installation request for mockery/mockery 1.4.2 -> satisfiable by mockery/mockery[1.4.2].
- mockery/mockery 1.4.2 requires php ^7.3 || ^8.0 -> your PHP version (7.2.34) does not satisfy that requirement.
Problem 3
- facade/ignition-contracts 1.0.2 requires php ^7.3|^8.0 -> your PHP version (7.2.34) does not satisfy that requirement.
- nunomaduro/collision v4.2.0 requires facade/ignition-contracts ^1.0 -> satisfiable by facade/ignition-contracts[1.0.2].
- Installation request for nunomaduro/collision v4.2.0 -> satisfiable by nunomaduro/collision[v4.2.0].
I had deleted the composer.lock file and executed composer install command.
My problem solved.
This might be stale, the issue here is that the php needs to be updated to version that will be compatible.
delete the composer.lock file and autoload file in vendor i.e vendor/autoload in your project
upgrade php version from php.net
run composer install --no scripts
run composer update
php artisan migrate
php artisan key:generate

Can I solve "Your requirements could not be resolved to an installable set of packages." in laravel composer

when I want to install laravel/ui the composer show this:
and my composer.json :
my laravel version is 6.13 and I went to laravel.com and I click the Authentication for laravel 6X and says for laravel 6 you have to install this package and the package is composer require laravel/ui "^1.0" --dev and composer show me that problem again what can I do?
Add this in composer.json and then use command composer update
"laravel/ui": "^1.2",
Sometimes the library which you're installing is not satisfied PHP version not only laravel version.

Command 'ui' is not defined in laravel 6.0

I start a new project in laravel but my composer installed a fresh version of laravel 6.0.1.
Php artisan make:auth command can't work.
I try many times but error can't remove
composer require laravel/ui
installed but
when I use the second command:
php artisan ui vue --auth
then system show me this message:
Command "ui" is not defined.
Using version ^1.0 for laravel/ui
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php on line 129
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php on line 129
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
you can try this:
C:\Whatever\Your_project_name>composer require laravel/ui
and
C:\Whatever\Your_project_name>php artisan ui vue --auth
Just this two inside your project folder.I am using vue but you can try other ones too.
Did you install the dependency? To run that command you need to install an additional package:
composer require laravel/ui
After this you should be able to run one of these commands:
php artisan ui bootstrap
php artisan ui vue
php artisan ui react
In case you need the auth views, you could:
php artisan ui bootstrap --auth
php artisan ui vue --auth
php artisan ui react --auth
Don't forget to run this after:
npm install
The same error hits me in the new version of Laravel 7.x, What I did the process is really simple: if your composer is old version and the terminal or cmd is giving you warnings to update it using some package then there are chances that the above error hits you.
Solution:
Step 1 : Try the following two commands in your normal terminal not of your project directory. The below command will only update the composer.
composer self-update
OR use the below command (it will update your dependencies plus your composer)
composer update
When you composer gets updated. check the composer by the below command
composer --version
Step 2 : First go to your project root folder C:\Whatever\Your_project_name>
composer require laravel/ui
Try any of the below command according to your front end framework.
php artisan ui vue --auth
php artisan ui bootstrap --auth
php artisan ui react --auth
At the end don't forget to run
npm install
If your User Interface is not working properly try below command.
npm run production
run "composer require laravel/ui 1" instead of "composer require laravel/ui"
laravel 6 works with version 1.0, it written in docs "Want to get started fast? Install the laravel/ui (1.0)"
I was facing the same issue is laravel 8.0, whenever i tried to run this command
php artisan ui vue -auth
after installing the laravel/ui package I was getting the error
command UI is not defined
I fixed this issue by using this command
composer update
it automatically install the laravel/ui package into my project and then I run this command to install the required auth for my web app.
`php artisan ui vue -auth`
You need to create another new project.
You can try this:
composer config -g repo.packagist composer https://packagist.phpcomposer.com
composer create-project --prefer-dist laravel/laravel project2 "7.0.*"
composer require laravel/ui
php artisan ui vue --auth
Just add the version in command line as well:
composer require laravel/ui "^1.0" --dev
Check this too.
using
composer require laravel/ui:*
worked for me
I recently faced this issue after upgrading from laravel 6 to 8. Installing laravel/ui did not work for me because the package was already installed.
I solved it by manually deleting cache folder at bootstrap/cache

Resources