Search code examples
phplaravelgoogle-drive-apicomposer-phpflysystem-google-drive

Problem with installing nao-pon/flysystem-google-drive Laravel


I have a problem with installing nao-pon/flysystem-google-drive

When I run the command, composer requires nao-pon/flysystem-google-drive or nao-pon/flysystem-google-drive:~1.1

I get the error like this:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Root composer.json requires nao-pon/flysystem-google-drive ^1.1 -> satisfiable by nao-pon/flysystem-google-drive[1.1.0, ..., 1.1.x-dev].
    - nao-pon/flysystem-google-drive[1.1.0, ..., 1.1.x-dev] 
require league/flysystem ~1.0 -> found league/flysystem[1.0.0-alpha1, ..., 1.x-dev] but it conflicts with your root composer.json require (^3.0).
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 nao-pon/flysystem-google-drive:*" to figure out if any version is installable, or "composer require nao-pon/flysystem-google-drive:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

What do I need to do to resolve this problem? Thanks!


Solution

  • nao-pon/flysystem-google-drive has seen its last update nearly two years ago. It depends on an old version of league/flysystem (namely: any from the v1 branch), but your code currently requires v3 of league/flysystem. If you don't want to downgrade that (as this might need a lot of work), you could use any other Google Drive adapter, like masbug/flysystem-google-drive-ext