I am using maatwebsite excel laravel package for export data. I've gone through your documentation and installed it on the local system and it is working fine. But it is throwing error on the live while installing maatwebsite/excel composer. On the server composer is updating and installing using CircleCI. I used like this into composer.json
"require": {
"maatwebsite/excel": "^3.1"
}
While run composer it throw error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package maatwebsite/excel could not be found in any version, there may be a typo in the package name.
Potential causes:
Expected behavir:
As Maatwebsite/excel is installed on the Local, same way it should be installed on the live.
Actual behavior:
It thrown error like this
You can see the error in the below. Also, I attached a screenshot.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package maatwebsite/excel could not be found in any version, there may be a typo in the package name.
Potential causes:
Any additional information, configuration or data that might be necessary to reproduce the issue.
The output shows that your lock file is not up to date with your composer file. It's best practise to run composer update locally and commit the composer.lock file and run composer install on the live server.
Thanks for your prompt response. I did the same as mentioned by you. Now I am getting the following error.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for phpoffice/phpspreadsheet 1.14.1 -> satisfiable by phpoffice/phpspreadsheet[1.14.1].
- phpoffice/phpspreadsheet 1.14.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 2
- phpoffice/phpspreadsheet 1.14.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- maatwebsite/excel 3.1.21 requires phpoffice/phpspreadsheet ^1.14 -> satisfiable by phpoffice/phpspreadsheet[1.14.1].
- Installation request for maatwebsite/excel 3.1.21 -> satisfiable by maatwebsite/excel[3.1.21].
To enable extensions, verify that they are enabled in your .ini files:
-
- /usr/local/etc/php/conf.d/docker-php-ext-intl.ini
- /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
- /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
- /usr/local/etc/php/conf.d/docker-php-ext-zip.ini
You can also run php --ini
inside terminal to see which files are used by PHP in CLI mode.
I checked and found gd extention is already enabled on the server, but still getting above error. Can you please help me on this?
It seems the PHP that runs composer install doesn't have gd enabled. I would recommend asking for help on Stackoverflow or Laracasts. It's a bit too specific (and maybe related to CircleCI) for this issue tracker.
I checked and found gd extention is already enabled on the server, but still getting above error. Can you please help me on this?
As mentioned before, I suggest you post this question on Stackoverflow or Laracasts as it's related to CircleCI/PHP and PhpSpreadsheet, not specifically this package.
Okay, Thank you!
You can tray this in Laravel 8 to Install composer require maatwebsite/excel
: composer require maatwebsite/excel --ignore-platform-reqs
Most helpful comment
Okay, Thank you!