'composer update - magento-cloud-metapackage - Your requirements could not be resolved to an installable set of packages

I am trying to integrate a magento project on my computer but I am getting the following error when I try to use the composer update

$ composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires magento/magento-cloud-metapackage >=2.4.1 <2.4.2, found magento/magento-cloud-metapackage[2.4.1] in the lock file but not in remote repositories, make sure you avoid updating this package to keep the one from the lock file.

This is what my composer.json file looks like.

Composer.json:

{
"name": "magento/magento-cloud-template",
"description": "eCommerce Platform for Growth (Enterprise Edition)",
"type": "project",
"version": "2.4.1",
"license": "OSL-3.0",
"config": {
    "preferred-install": "dist",
    "sort-packages": true
},
"repositories": {
    "repo": {
        "type": "composer",
        "url": "https://repo.magento.com/"
}       
},
"require": {
    "container-interop/container-interop": "^1.2",
    "magento/magento-cloud-metapackage": ">=2.4.1 <2.4.2",
    "mageplaza/magento-2-spanish-language-pack": "dev-master",
    "mageplaza/module-currency-formatter": "^1.0",
    "phpoffice/phpspreadsheet": "^1.18",
    "tecnickcom/tcpdf": "^6.3",
    "transbank/transbank-sdk": "~2.0"
},
"suggest": {
    "ext-pcntl": "Need for run processes in parallel mode"
},
"conflict": {
    "gene/bluefoot": "*"
},
"autoload": {
    "psr-4": {
        "Magento\\Setup\\": "setup/src/Magento/Setup/",
        "Magento\\": "app/code/Magento/",
        "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
    },
    "psr-0": {
        "": [
            "app/code/",
            "generated/code/"
        ]
    },
    "files": [
        "app/etc/NonComposerComponentRegistration.php"
    ],
    "exclude-from-classmap": [
        "**/dev/**",
        "**/update/**",
        "**/Test/**"
    ]
},
"autoload-dev": {
    "psr-4": {
        "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
        "Magento\\Tools\\": "dev/tools/Magento/Tools/",
        "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
        "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
        "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
    }
},
"minimum-stability": "alpha",
"prefer-stable": true,
"extra": {
    "component_paths": {
        "trentrichardson/jquery-timepicker-addon": "lib/web/jquery/jquery-ui-timepicker-addon.js",
        "components/jquery": [
            "lib/web/jquery.js",
            "lib/web/jquery/jquery.min.js",
            "lib/web/jquery/jquery-migrate.js"
        ],
        "blueimp/jquery-file-upload": "lib/web/jquery/fileUploader",
        "components/jqueryui": [
            "lib/web/jquery/jquery-ui.js"
        ],
        "twbs/bootstrap": [
            "lib/web/jquery/jquery.tabs.js"
        ],
        "tinymce/tinymce": "lib/web/tiny_mce_4"
    },
    "magento-force": true,
    "magento-deploystrategy": "copy"
}
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source