Voyager Laravel installation problem (composer) - php

OS: Centos 8
PHP Version: Multi-php (7.2-default, 7.3, 7.4, 8.0)
Composer version 2.1.3
I have initialed a new laravel project:
/usr/bin/php74 /usr/local/bin/composer create-project --prefer-dist laravel/laravel:^7.0 test
(I'm using php 7.4 as a version)
After installing the default laravel project is working fine. Afterwards I want to add voyager. I'm entering the folder with cd and then running the command..
/usr/bin/php74 /usr/local/bin/composer require tcg/voyager
after running the command i'm getting errors:
Problem 1
- tcg/voyager[1.4.x-dev, ..., 1.x-dev] require intervention/image ^2.4 -> satisfiable by intervention/image[2.4.0, ..., 2.5.1].
- intervention/image 2.4.x-dev is an alias of intervention/image dev-master and thus requires it to be installed too.
- tcg/voyager[v1.4.0, ..., v1.4.2] require league/flysystem ~1.0.41 -> found league/flysystem[1.0.41, ..., 1.0.x-dev] but the
package is fixed to 1.1.4 (lock file version) by a partial update and
that version does not match. Make sure you list it as an argument for
the update command.
- intervention/image[dev-master, 2.4.0, ..., 2.5.1] require guzzlehttp/psr7 ~1.1 -> found guzzlehttp/psr7[1.1.0, ..., 1.x-dev] but
the package is fixed to 2.0.0 (lock file version) by a partial update
and that version does not match. Make sure you list it as an argument
for the update command.
- Root composer.json requires tcg/voyager ^1.4 -> satisfiable by tcg/voyager[v1.4.0, ..., 1.x-dev].
Use the option --with-all-dependencies (-W) to allow upgrades,
downgrades and removals for packages currently locked to specific
versions.
After running it with -W parameter:
Your requirements could not be resolved to an installable set of
packages.
Problem 1
- Root composer.json requires laravel/framework ^7.29, found laravel/framework[v7.29.0, ..., 7.x-dev] but these were not loaded,
likely because it conflicts with another require.
Installation failed, reverting ./composer.json and ./composer.lock to
their original content.
I have tried this with different variations (different php versions, last laravel version and more - same result - but these were not loaded, likely because it conflicts with another require.
I have read almost the whole internet with for this.., but nothing helped..

composer require tcg/voyager --with-all-dependencies
try the above command

Related

Jetstream/Livewire package not installing

I installed a new laravel 8 project and tried to install Jetstream/Livewire but its giving me this error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/jetstream[v2.11.0, ..., 2.x-dev] require illuminate/console ^9.21 -> found illuminate/console[v9.21.0, ..., 9.x-dev] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires laravel/jetstream ^2.11 -> satisfiable by laravel/jetstream[v2.11.0, v2.11.1, v2.11.2, 2.x-dev].
You can also try re-running composer require with an explicit version constraint, e.g. "composer require laravel/jetstream:*" to figure out if any version is installable, or "composer require laravel/jetstream:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I tried composer clear-cache and composer self-update and it still didn't work.
P.S I have to use laravel 8 because i'm on a tutorial that uses it.
I had to be specific with which version of jetstream/livewire I wanted to install and also had to allow all dependencies of the version to be installed, updated or downgraded.
This is the code I tried
composer require laravel/jetstream:^2.1 --with-all-dependencies
AND
php artisan jetstream:install livewire

I'm trying to install maatwebsite/excel package to my laravel with but got this error

I'm trying to install maatwebsite/excel package to my laravel with this command
composer require maatwebsite/excel
but i got this error message instead:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- maatwebsite/excel[3.1.28, ..., 3.1.30] require phpoffice/phpspreadsheet 1.16.* -> satisfiable by phpoffice/phpspreadsheet[1.16.0].
- maatwebsite/excel[3.1.31, ..., 3.1.x-dev] require phpoffice/phpspreadsheet ^1.18 -> satisfiable by phpoffice/phpspreadsheet[1.18.0, 1.19.0, 1.20.0].
- maatwebsite/excel 3.1.27 requires phpoffice/phpspreadsheet ^1.16 -> satisfiable by phpoffice/phpspreadsheet[1.16.0, ..., 1.20.0].
- maatwebsite/excel 3.1.26 requires phpoffice/phpspreadsheet ^1.15 -> satisfiable by phpoffice/phpspreadsheet[1.15.0, ..., 1.20.0].
equirement.
- phpoffice/phpspreadsheet[1.15.0, ..., 1.20.0] require ext-gd * -> it is missing from your system. Install
or enable PHP's gd extension.
- Root composer.json requires maatwebsite/excel ^3.1 -> satisfiable by maatwebsite/excel[3.1.0, ..., 3.1.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- C:\xampp\php\php.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-gd` to temporarily ignore these required extensions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require maatwebsite/excel:*" to figure out if any version is installable, or "composer require maatwebsite/excel:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
i'm using :
composer version 2.2.1
PHP version 8.0.1
laravel 8.68.1
what caused this???
The error thrown also gives you the solution, there are some missing packages that the extension requires, just install them separately or allow composer to auto install all with this line:
composer require maatwebsite/excel:*

ERROR when try to install cretueusebiu/valet-windows

Hi Guys i try to install cretueusebiu/valet-windows, but i found the error like this :
$ composer global require cretueusebiu/valet-windows
Changed current directory to C:/Users/ROG/AppData/Roaming/Composer
Using version ^2.4 for cretueusebiu/valet-windows
./composer.json has been updated
Running composer update cretueusebiu/valet-windows
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- illuminate/container[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.1.1) does not satisfy that requirement.
- illuminate/container[v8.12.0, ..., v8.77.1] require psr/container ^1.0 -> found psr/container[1.0.0, 1.1.0, 1.1.1, 1.1.2] but the package is fixed to 2.0.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- cretueusebiu/valet-windows[2.4.0, ..., 2.4.1] require illuminate/container ^8.0 -> satisfiable by illuminate/container[v8.0.0, ..., v8.77.1].
- Root composer.json requires cretueusebiu/valet-windows ^2.4 -> satisfiable by cretueusebiu/valet-windows[2.4.0, 2.4.1].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require cretueusebiu/valet-windows:*" to figure out if any version is installable, or "composer require cretueusebiu/valet-windows:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
can anyone help, Thanks
illuminate/container[v8.0.0, ..., v8.11.2] require php ^7.3 -> your (8.1.1)
The error is self-explanatory. The illuminate/container package requires PHP version 7.3 or above but not reaching 8.0 or above while you're PHP version is 8.1
If the package doesn't contain breaking changes for PHP 8 you can try installing using --ignore-platform-reqs flag like:
composer global require cretueusebiu/valet-windows --ignore-platform-reqs
Try to write this code to install...
composer global require cretueusebiu/valet-windows --with-all-dependencies
I solved it by downgrading my php version, thanks All

composer require findbrok/php-watson-api-bridge giving these error how to solve this my laravel is 8

I am trying to create a bridge with laravel 8 and watson api but i am getting the follwoing error can some please help me here
composer require findbrok/php-watson-api-bridge
Using version ^1.1 for findbrok/php-watson-api-bridge
./composer.json has been updated
Running composer update findbrok/php-watson-api-bridge
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- findbrok/php-watson-api-bridge 1.1.x-dev requires illuminate/support ~5.0 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.
- findbrok/php-watson-api-bridge[dev-master, v1.1.0, ..., v1.1.2] require guzzlehttp/guzzle 6.2.* -> found guzzlehttp/guzzle[6.2.0, 6.2.1, 6.2.2, 6.2.3] but it conflicts with your root composer.json require (^7.0.1).
- findbrok/php-watson-api-bridge 1.2.x-dev is an alias of findbrok/php-watson-api-bridge dev-master and thus requires it to be installed too.
- Root composer.json requires findbrok/php-watson-api-bridge ^1.1 -> satisfiable by findbrok/php-watson-api-bridge[v1.1.0, ..., 1.2.x-dev (alias of dev-master)].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to
specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.```
It appears that the package is old and no longer maintained.
The problem is Laravel 8 installs Guzzle Http with the version 7.
But the package you're trying to install is compatible with Guzzle until version 6.
You may downgrade Guzzle in your root composer.json, but I wouldn't recommend it. It may break the framework.
Another solution is trying to make a PR to the package to make it compatible with Laravel 8, or use Laravel version 7

laravel/ui[v3.0.0, ..., v3.2.0] require illuminate/console ^8.0 -> found illuminate/console[v8.0.0, ..., v8.36.2]

I am trying to make pdf using baaryvdh/dompdf in laravel but while installing the package using the command:
`composer require barryvdh/laravel-dompdf`
getting the error:
Using version ^0.9.0 for barryvdh/laravel-dompdf
./composer.json has been updated
Running composer update barryvdh/laravel-dompdf
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.0.0, ..., v3.2.0] require illuminate/console ^8.0 -> found illuminate/console[v8.0.0, ..., v8.36.2] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires laravel/ui ^3.0 -> satisfiable by laravel/ui[v3.0.0, v3.1.0, v3.2.0].
Run below command
composer require barryvdh/laravel-dompdf:0.8.5
But Remember above version needs,
This package requires php ^7.1.3.
Because if will not pass version bydefault it will take latest version and the latest version of dompdf is supported with laravel 8 and laravel ui 3.x
or
Please run "Composer update" Command
And Then Run
composer require barryvdh/laravel-dompdf:0.8.5
Hope this will work for you.

Categories