I am trying to upgrade Magento Version 2.4.1 to 2.4.2 and getting an errors
Magento Open Source 2.4.2 is trying to change the existing order of the require section.
Local order:
[
magento/composer-root-update-plugin,
magento/product-community-edition
]
Magento Open Source 2.4.2 order:
[
magento/product-community-edition,
magento/composer-root-update-plugin
] but it will not be changed. Re-run using --use-default-magento-values or --interactive-magento-conflicts to override with the Magento order.
Updating composer.json for Magento Open Source 2.4.2 ...
./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
- The requested package dealerdirect/phpcodesniffer-composer-installer (locked at v0.5.0, required as ^0.7.0) is satisfiable by dealerdirect/phpcodesniffer-composer-installer[v0.5.0] but these conflict with your requirements or minimum-stability.
Problem 2
- Conclusion: don't install magento/product-community-edition 2.4.2
- Conclusion: remove amzn/amazon-pay-and-login-magento-2-module 4.0.4
- Conclusion: don't install amzn/amazon-pay-and-login-magento-2-module 4.0.4
- Installation request for magento/product-community-edition 2.4.2 -> satisfiable by magento/product-community-edition[2.4.2].
- Conclusion: don't install amzn/amazon-pay-and-login-magento-2-module 4.0.4
- magento/product-community-edition 2.4.2 requires amzn/amazon-pay-and-login-magento-2-module 4.2.0 -> satisfiable by amzn/amazon-pay-and-login-magento-2-module[4.2.0].
- Can only install one of: amzn/amazon-pay-and-login-magento-2-module[4.2.0, 4.0.4].
- Can only install one of: amzn/amazon-pay-and-login-magento-2-module[4.2.0, 4.0.4].
- Installation request for amzn/amazon-pay-and-login-magento-2-module (locked at 4.0.4) -> satisfiable by amzn/amazon-pay-and-login-magento-2-module[4.0.4].
Installation failed, reverting ./composer.json to its original content.
The native 'composer require' command failed, reverting ./composer.json to its original content from before the Magento root update.

composer update --use-default-magento-values– CodeForGood Mar 10 '21 at 14:26