magento2 – InvalidArgumentException during Magento upgrade via Composer [Package is not installed: magento/project-community-edition-2.4.0.0]


We are seeing InvalidArgumentException during Magento upgrade via Composer

 (InvalidArgumentException)
  Package is not installed: magento/project-community-edition-2.4.0.0

It seems to be related to the “replace” section of composer where a module is mentioned that does no longer exist in M2.4. But which one?

Question:
How could we get this to work? or find out more exact what is wrong?

Full log with update -vvv

Package operations: 0 installs, 2 updates, 0 removals
Updates: magento/project-community-edition:2.4.0, mailchimp/mc-magento2:102.3.41


  (InvalidArgumentException)
  Package is not installed: magento/project-community-edition-2.4.0.0


Exception trace:
 () at /usr/share/php/Composer/Installer/LibraryInstaller.php:114
 ComposerInstallerLibraryInstaller->update() at /usr/share/php/Composer/Installer/InstallationManager.php:193
 ComposerInstallerInstallationManager->update() at /usr/share/php/Composer/Installer/InstallationManager.php:160
 ComposerInstallerInstallationManager->execute() at /usr/share/php/Composer/Installer.php:611
 ComposerInstaller->doInstall() at /usr/share/php/Composer/Installer.php:232
 ComposerInstaller->run() at /usr/share/php/Composer/Command/UpdateCommand.php:163
 ComposerCommandUpdateCommand->execute() at /usr/share/php/Symfony/Component/Console/Command/Command.php:245
 SymfonyComponentConsoleCommandCommand->run() at /usr/share/php/Symfony/Component/Console/Application.php:835
 SymfonyComponentConsoleApplication->doRunCommand() at /usr/share/php/Symfony/Component/Console/Application.php:185
 SymfonyComponentConsoleApplication->doRun() at /usr/share/php/Composer/Console/Application.php:281
 ComposerConsoleApplication->doRun() at /usr/share/php/Symfony/Component/Console/Application.php:117
 SymfonyComponentConsoleApplication->run() at /usr/share/php/Composer/Console/Application.php:113
 ComposerConsoleApplication->run() at /usr/bin/composer:62

update (--prefer-source) (--prefer-dist) (--dry-run) (--dev) (--no-dev) (--lock) (--no-custom-installers) (--no-autoloader) (--no-scripts) (--no-progress) (--no-suggest) (--with-dependencies) (--with-all-dependencies) (-v|vv|vvv|--verbose) (-o|--optimize-autoloader) (-a|--classmap-authoritative) (--apcu-autoloader) (--ignore-platform-reqs) (--prefer-stable) (--prefer-lowest) (-i|--interactive) (--root-reqs) (--) (<packages>)...

enter image description here

References:
https://www.onooks.com/invalidargumentexception-during-magento-upgrade-via-composer/

Composer replace section
        "magento/module-marketplace": "*",
        "magento/module-admin-notification": "*",
        "magento/module-advanced-pricing-import-export": "*",
        "magento/module-amqp": "*",
        "magento/module-amqp-store": "*",
        "magento/module-analytics": "*",
        "magento/module-bundle-graph-ql": "*",
        "magento/module-cardinal-commerce": "*",
        "magento/module-catalog-customer-graph-ql": "*",
        "magento/module-catalog-analytics": "*",
        "magento/module-catalog-inventory-graph-ql": "*",
        "magento/module-catalog-rule-graph-ql": "*",
        "magento/module-checkout-agreements-graph-ql": "*",
        "magento/module-customer-analytics": "*",
        "magento/module-customer-downloadable-graph-ql": "*",
        "magento/module-dhl": "*",
        "magento/module-directory-graph-ql": "*",
        "magento/module-downloadable": "*",
        "magento/module-downloadable-graph-ql": "*",
        "magento/module-downloadable-import-export": "*",
        "magento/module-elasticsearch": "*",
        "magento/module-elasticsearch-6": "*",
        "magento/module-elasticsearch-7": "*",
        "magento/module-fedex": "*",
        "magento/module-gift-message-graph-ql": "*",
        "magento/module-google-adwords": "*",
        "magento/module-graph-ql": "*",
        "magento/module-graph-ql-cache": "*",
        "magento/module-catalog-graph-ql": "*",
        "magento/module-catalog-cms-graph-ql": "*",
        "magento/module-catalog-url-rewrite-graph-ql": "*",
        "magento/module-configurable-product-graph-ql": "*",
        "magento/module-customer-graph-ql": "*",
        "magento/module-eav-graph-ql": "*",
        "magento/module-swatches-graph-ql": "*",
        "magento/module-tax-graph-ql": "*",
        "magento/module-url-rewrite-graph-ql": "*",
        "magento/module-cms-url-rewrite-graph-ql": "*",
        "magento/module-weee-graph-ql": "*",
        "magento/module-cms-graph-ql": "*",
        "magento/module-grouped-product-graph-ql": "*",
        "magento/module-mysql-mq": "*",
        "magento/module-newsletter-graph-ql": "*",
        "magento/module-paypal-graph-ql": "*",
        "magento/module-quote-analytics": "*",
        "magento/module-quote-graph-ql": "*",
        "magento/module-related-product-graph-ql": "*",
        "magento/module-release-notification": "*",
        "magento/module-review-graph-ql": "*",
        "magento/module-review-analytics": "*",
        "magento/module-sales-analytics": "*",
        "magento/module-sales-graph-ql": "*",
        "magento/module-sample-data": "*",
        "magento/module-send-friend-graph-ql": "*",
        "magento/module-store-graph-ql": "*",
        "magento/module-swagger": "*",
        "magento/module-swagger-webapi": "*",
        "magento/module-swagger-webapi-async": "*",
        "magento/module-theme-graph-ql": "*",
        "magento/module-ups": "*",
        "magento/module-usps": "*",
        "magento/module-vault-graph-ql": "*",
        "magento/module-wishlist-graph-ql": "*",
        "magento/module-wishlist-analytics": "*",
        "magento/language-de_de": "*",
        "magento/language-es_es": "*",
        "magento/language-fr_fr": "*",
        "magento/language-pt_br": "*",
        "magento/language-zh_hans_cn": "*",
        "magento/framework": "*",
        "magento/framework-amqp": "*",
        "magento/framework-bulk": "*",
        "magento/framework-message-queue": "*",
        "magento/module-dhl": "*",
        "magento/module-fedex": "*",
        "magento/module-authorizenet": "*",
        "magento/module-google-adwords": "*",
        "magento/module-sample-data": "*",
        "magento/module-swagger": "*",
        "magento/module-swagger-webapi": "*",
        "magento/module-swagger-webapi-async": "*",
        "magento/module-ups": "*",
        "magento/module-usps": "*",
        "magento/module-braintree": "*",
        "magento/module-signifyd": "*",
        "magento/module-release-notification": "*",
        "magento/module-analytics": "*",
        "magento/module-catalog-analytics": "*",
        "magento/module-customer-analytics": "*",
        "magento/module-quote-analytics": "*",
        "magento/module-review-analytics": "*",
        "magento/module-sales-analytics": "*",
        "magento/module-wishlist-analytics": "*",
        "magento/module-bundle-graph-ql": "*",
        "magento/module-catalog-graph-ql": "*",
        "magento/module-catalog-inventory-graph-ql": "*",
        "magento/module-catalog-url-rewrite-graph-ql": "*",
        "magento/module-cms-graph-ql": "*",
        "magento/module-cms-url-rewrite-graph-ql": "*",
        "magento/module-inventory-graph-ql": "*",
        "magento/module-configurable-product-graph-ql": "*",
        "magento/module-customer-graph-ql": "*",
        "magento/module-downloadable-graph-ql": "*",
        "magento/module-eav-graph-ql": "*",
        "magento/module-graph-ql": "*",
        "magento/module-grouped-product-graph-ql": "*",
        "magento/module-quote-graph-ql": "*",
        "magento/module-store-graph-ql": "*",
        "magento/module-swatches-graph-ql": "*",
        "magento/module-tax-graph-ql": "*",
        "magento/module-url-rewrite-graph-ql": "*",
        "magento/module-weee-graph-ql": "*",
        "magento/module-amqp": "*",
        "magento/module-amqp-store": "*",
        "dotmailer/dotmailer-magento2-extension": "*",
        "dotmailer/dotmailer-magento2-extension-package": "*",
        "dotmailer/dotmailer-magento2-extension-enterprise": "*",
        "dotmailer/dotmailer-magento2-extension-chat": "*",
        "klarna/module-kp": "*",
        "klarna/module-ordermanagement": "*",
        "klarna/module-core": "*",
        "amzn/amazon-pay-sdk-php": "*",
        "amzn/amazon-pay-and-login-with-amazon-core-module": "*",
        "amzn/login-with-amazon-module": "*",
        "amzn/amazon-pay-module": "*",
        "amzn/amazon-pay-and-login-magento-2-module": "*",
        "vertex/module-tax": "*",
        "vertex/sdk": "*"