Your requirements could not be resolved to an installable set of packages.

Problem:

composer require .....
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - .....
    - Conclusion: don't install magento/framework

Reason

The error is possible in few cases:

  • Required package is not compatible with your magento version
  • composer.lock file is outdated.

Solution

You can run command:

composer update

and then run same composer command composer require ... again.

Also you can add --ignore-platform-reqs flag to command for ignore environment related issues (like php version):

composer require .... --ignore-platform-reqs
Loading...