<p>Try to remove <code>composer.lock</code> and nuke the <code>vendor</code> folder.</p>
<p>Then run <code>composer i</code></p>
<p>To elaborate on your problem, you're probably running <code>composer i</code>/<code>composer update</code> in the wrong folder or it's using a global profile.</p>

CC BY-SA 4.0
2024-11-15T13:10:27.947Z
Thank you. In my github deploy action there was indeed `composer update`. changed that to `composer install` and `rm -rf` the heck out of it. Now it works.
KSPR
CC BY-SA 4.0
2024-11-11T20:31:34.477Z
2024-11-11T20:31:34.477Z
RomanAvr
<p>I had to downgrade craft from v5 to v4 because v5 is not working and I can't figure out why. (Server has gone away when loading the frontend)</p>
<p>Now I have a huge versioning mess:</p>
<blockquote>
<p>Run composer install Installing dependencies from lock file (including
require-dev) Verifying lock file contents can be installed on current
platform.</p>
<ul>
<li>Required package &quot;bymayo/commerce-widgets&quot; is in the lock file as &quot;3.0.0&quot; but that does not satisfy your constraint &quot;5.0.1&quot;.</li>
<li>Required package &quot;craftcms/ckeditor&quot; is in the lock file as &quot;3.9.0&quot; but that does not satisfy your constraint &quot;4.3.1&quot;.</li>
<li>Required package &quot;craftcms/cms&quot; is in the lock file as &quot;4.12.7&quot; but that does not satisfy your constraint &quot;^5.0.0&quot;.</li>
<li>Required package &quot;craftcms/commerce&quot; is in the lock file as &quot;4.6.13&quot; but that does not satisfy your constraint &quot;5.2.1&quot;.</li>
<li>Required package &quot;enupal/translate&quot; is in the lock file as &quot;3.1.0&quot; but that does not satisfy your constraint &quot;4.0.3&quot;.</li>
<li>Required package &quot;hybridinteractive/craft-contact-form-extensions&quot; is in the lock file as &quot;4.2.2&quot; but that does not satisfy your
constraint &quot;5.0.0&quot;.</li>
<li>Required package &quot;nystudio107/craft-minify&quot; is in the lock file as &quot;4.0.1&quot; but that does not satisfy your constraint &quot;5.0.0&quot;.</li>
<li>Required package &quot;nystudio107/craft-retour&quot; is in the lock file as &quot;4.1.19&quot; but that does not satisfy your constraint &quot;5.0.3&quot;.</li>
<li>Required package &quot;nystudio107/craft-seomatic&quot; is in the lock file as &quot;4.1.4&quot; but that does not satisfy your constraint &quot;5.1.5&quot;.</li>
<li>Required package &quot;putyourlightson/craft-blitz&quot; is in the lock file as &quot;4.23.2&quot; but that does not satisfy your constraint &quot;^5.9.1&quot;.</li>
<li>Required package &quot;spacecatninja/imager-x&quot; is in the lock file as &quot;4.4.1&quot; but that does not satisfy your constraint &quot;5.0.2&quot;.</li>
<li>Required package &quot;topshelfcraft/wordsmith&quot; is in the lock file as &quot;4.5.0&quot; but that does not satisfy your constraint &quot;5.0.0&quot;.</li>
<li>Required package &quot;verbb/super-table&quot; is in the lock file as &quot;3.0.15&quot; but that does not satisfy your constraint &quot;4.0.2&quot;. This usually
happens when composer files are incorrectly merged or the
composer.json file is manually edited. Read more about correctly
resolving merge conflicts
<a href="https://getcomposer.org/doc/articles/resolving-merge-conflicts.md" rel="nofollow noreferrer">https://getcomposer.org/doc/articles/resolving-merge-conflicts.md</a> and
prefer using the &quot;require&quot; command over editing the composer.json file
directly <a href="https://getcomposer.org/doc/03-cli.md#require-r" rel="nofollow noreferrer">https://getcomposer.org/doc/03-cli.md#require-r</a> Error:
Process completed with exit code 4.</li>
</ul>
</blockquote>
<p>This is my composer.json file:</p>
<pre><code>{
    &quot;require&quot;: {
        &quot;airbrake/phpbrake&quot;: &quot;^0.7.3&quot;,
        &quot;bymayo/commerce-widgets&quot;: &quot;3.0.0&quot;,
        &quot;craftcms/ckeditor&quot;: &quot;3.9.0&quot;,
        &quot;craftcms/cms&quot;: &quot;4.12.7&quot;,
        &quot;craftcms/commerce&quot;: &quot;4.6.13&quot;,
        &quot;craftcms/contact-form&quot;: &quot;3.1.0&quot;,
        &quot;craftcms/contact-form-honeypot&quot;: &quot;2.1.0&quot;,
        &quot;enupal/translate&quot;: &quot;3.1.0&quot;,
        &quot;humantools/payrexx-craft&quot;: &quot;*&quot;,
        &quot;hybridinteractive/craft-contact-form-extensions&quot;: &quot;4.2.2&quot;,
        &quot;miranj/craft-obfuscator&quot;: &quot;1.2.0&quot;,
        &quot;nystudio107/craft-minify&quot;: &quot;4.0.1&quot;,
        &quot;nystudio107/craft-retour&quot;: &quot;4.1.19&quot;,
        &quot;nystudio107/craft-seomatic&quot;: &quot;4.1.4&quot;,
        &quot;ostark/craft-async-queue&quot;: &quot;3.2.1&quot;,
        &quot;putyourlightson/craft-blitz&quot;: &quot;4.23.2&quot;,
        &quot;spacecatninja/imager-x&quot;: &quot;4.4.1&quot;,
        &quot;topshelfcraft/wordsmith&quot;: &quot;4.5.0&quot;,
        &quot;verbb/super-table&quot;: &quot;3.0.15&quot;,
        &quot;vlucas/phpdotenv&quot;: &quot;^5.4.0&quot;
    },
    &quot;config&quot;: {
        &quot;sort-packages&quot;: true,
        &quot;optimize-autoloader&quot;: true,
        &quot;platform&quot;: {
            &quot;php&quot;: &quot;8.3&quot;
        },
        &quot;allow-plugins&quot;: {
            &quot;craftcms/plugin-installer&quot;: true,
            &quot;yiisoft/yii2-composer&quot;: true,
            &quot;treeware/plant&quot;: true,
            &quot;php-http/discovery&quot;: true
        }
    },
    &quot;scripts&quot;: {
        &quot;post-root-package-install&quot;: [
            &quot;@php -r \&quot;file_exists('.env') || copy('.env.example', '.env');\&quot;&quot;
        ]
    },
    &quot;repositories&quot;: [
        {
            &quot;type&quot;: &quot;composer&quot;,
            &quot;url&quot;: &quot;https://composer.craftcms.com&quot;,
            &quot;canonical&quot;: false
        },
        {
            &quot;type&quot;: &quot;path&quot;,
            &quot;url&quot;: &quot;./plugins/payrexx-craft&quot;
        }
    ]
}
</code></pre>
<p>I've tried everything, deleting the lockfile, regenerating it with <code>composer update</code> but this error won't go away and I cant see why.</p>
<p>When I look at this line:</p>
<blockquote>
<ul>
<li>Required package &quot;craftcms/cms&quot; is in the lock file as &quot;4.12.7&quot; but that does not satisfy your constraint &quot;^5.0.0&quot;.</li>
</ul>
</blockquote>
<p>In composer.lock ther is no <code>^5.0.0</code> defined anywhere. I don't understand where this is coming from. I don't know what to do.</p>
<pre><code>{
            &quot;name&quot;: &quot;craftcms/cms&quot;,
            &quot;version&quot;: &quot;4.12.7&quot;,
            &quot;dist&quot;: {
                &quot;type&quot;: &quot;zip&quot;,
                &quot;url&quot;: &quot;https://api.github.com/repos/craftcms/cms/zipball/91eb1f4d7ca6ebe79ea9dcb950b1b113b8689363&quot;,
                &quot;reference&quot;: &quot;91eb1f4d7ca6ebe79ea9dcb950b1b113b8689363&quot;,
                &quot;shasum&quot;: &quot;&quot;
            },
            &quot;require&quot;: {
                &quot;commerceguys/addressing&quot;: &quot;^1.2&quot;,
                &quot;composer/composer&quot;: &quot;^2.7.0&quot;,
                &quot;craftcms/plugin-installer&quot;: &quot;~1.6.0&quot;,
                &quot;craftcms/server-check&quot;: &quot;~2.1.2&quot;,
                &quot;creocoder/yii2-nested-sets&quot;: &quot;~0.9.0&quot;,
                &quot;elvanto/litemoji&quot;: &quot;~4.3.0&quot;,
                &quot;enshrined/svg-sanitize&quot;: &quot;~0.19.0&quot;,
                &quot;ext-bcmath&quot;: &quot;*&quot;,
                &quot;ext-curl&quot;: &quot;*&quot;,
                &quot;ext-dom&quot;: &quot;*&quot;,
                &quot;ext-intl&quot;: &quot;*&quot;,
                &quot;ext-json&quot;: &quot;*&quot;,
                &quot;ext-mbstring&quot;: &quot;*&quot;,
                &quot;ext-openssl&quot;: &quot;*&quot;,
                &quot;ext-pcre&quot;: &quot;*&quot;,
                &quot;ext-pdo&quot;: &quot;*&quot;,
                &quot;ext-zip&quot;: &quot;*&quot;,
                &quot;guzzlehttp/guzzle&quot;: &quot;^7.2.0&quot;,
                &quot;illuminate/collections&quot;: &quot;^9.1.0&quot;,
                &quot;mikehaertl/php-shellcommand&quot;: &quot;^1.6.3&quot;,
                &quot;moneyphp/money&quot;: &quot;^4.0&quot;,
                &quot;monolog/monolog&quot;: &quot;^2.3&quot;,
                &quot;php&quot;: &quot;^8.0.2&quot;,
                &quot;pixelandtonic/imagine&quot;: &quot;~1.3.3.1&quot;,
                &quot;samdark/yii2-psr-log-target&quot;: &quot;^1.1.3&quot;,
                &quot;seld/cli-prompt&quot;: &quot;^1.0.4&quot;,
                &quot;symfony/http-client&quot;: &quot;^6.0.3&quot;,
                &quot;symfony/var-dumper&quot;: &quot;^5.0|^6.0&quot;,
                &quot;symfony/yaml&quot;: &quot;^5.2.3&quot;,
                &quot;theiconic/name-parser&quot;: &quot;^1.2&quot;,
                &quot;twig/twig&quot;: &quot;~3.14.0&quot;,
                &quot;voku/stringy&quot;: &quot;^6.4.0&quot;,
                &quot;webonyx/graphql-php&quot;: &quot;~14.11.5&quot;,
                &quot;yiisoft/yii2&quot;: &quot;~2.0.51.0&quot;,
                &quot;yiisoft/yii2-debug&quot;: &quot;~2.1.25.0&quot;,
                &quot;yiisoft/yii2-queue&quot;: &quot;~2.3.2&quot;,
                &quot;yiisoft/yii2-symfonymailer&quot;: &quot;^2.0.0&quot;
            },
            &quot;conflict&quot;: {
                &quot;webonyx/graphql-php&quot;: &quot;14.11.7&quot;
            },
            &quot;provide&quot;: {
                &quot;bower-asset/inputmask&quot;: &quot;5.0.9&quot;,
                &quot;bower-asset/jquery&quot;: &quot;3.6.1&quot;,
                &quot;bower-asset/punycode&quot;: &quot;2.3.1&quot;,
                &quot;bower-asset/yii2-pjax&quot;: &quot;2.0.8&quot;,
                &quot;yii2tech/ar-softdelete&quot;: &quot;1.0.4&quot;
            },
            &quot;suggest&quot;: {
                &quot;ext-exif&quot;: &quot;Adds support for parsing image EXIF data.&quot;,
                &quot;ext-iconv&quot;: &quot;Adds support for more character encodings than PHP’s built-in mb_convert_encoding() function, which Craft will take advantage of when converting strings to UTF-8.&quot;,
                &quot;ext-imagick&quot;: &quot;Adds support for more image processing formats and options.&quot;
            },
            &quot;type&quot;: &quot;library&quot;,
            &quot;autoload&quot;: {
                &quot;psr-4&quot;: {
                    &quot;craft\\&quot;: &quot;src/&quot;,
                    &quot;yii2tech\\ar\\softdelete\\&quot;: &quot;lib/ar-softdelete/src/&quot;
                }
            },
            &quot;license&quot;: [
                &quot;proprietary&quot;
            ],
            &quot;authors&quot;: [
                {
                    &quot;name&quot;: &quot;Pixel &amp; Tonic&quot;,
                    &quot;homepage&quot;: &quot;https://pixelandtonic.com/&quot;
                }
            ],
            &quot;description&quot;: &quot;Craft CMS&quot;,
            &quot;homepage&quot;: &quot;https://craftcms.com&quot;,
            &quot;keywords&quot;: [
                &quot;cms&quot;,
                &quot;craftcms&quot;,
                &quot;yii2&quot;
            ],
            &quot;support&quot;: {
                &quot;email&quot;: &quot;support@craftcms.com&quot;,
                &quot;issues&quot;: &quot;https://github.com/craftcms/cms/issues?state=open&quot;,
                &quot;forum&quot;: &quot;https://craftcms.stackexchange.com/&quot;,
                &quot;source&quot;: &quot;https://github.com/craftcms/cms&quot;,
                &quot;docs&quot;: &quot;https://craftcms.com/docs/4.x/&quot;,
                &quot;rss&quot;: &quot;https://github.com/craftcms/cms/releases.atom&quot;
            },
            &quot;time&quot;: &quot;2024-10-15T22:32:35+00:00&quot;
        },
</code></pre>

<composer>
version but that does not satisfy your constraint
# version but that does not satisfy your constraint

(Asked by: username_0 on 2024-11-01)

I had to downgrade craft from v5 to v4 because v5 is not working and I can't figure out why. (Server has gone away when loading the frontend)
Now I have a huge versioning mess:

Run composer install Installing dependencies from lock file (including
require-dev) Verifying lock file contents can be installed on current
platform.

Required package "bymayo/commerce-widgets" is in the lock file as "3.0.0" but that does not satisfy your constraint "5.0.1".
Required package "craftcms/ckeditor" is in the lock file as "3.9.0" but that does not satisfy your constraint "4.3.1".
Required package "craftcms/cms" is in the lock file as "4.12.7" but that does not satisfy your constraint "^5.0.0".
Required package "craftcms/commerce" is in the lock file as "4.6.13" but that does not satisfy your constraint "5.2.1".
Required package "enupal/translate" is in the lock file as "3.1.0" but that does not satisfy your constraint "4.0.3".
Required package "hybridinteractive/craft-contact-form-extensions" is in the lock file as "4.2.2" but that does not satisfy your
constraint "5.0.0".
Required package "nystudio107/craft-minify" is in the lock file as "4.0.1" but that does not satisfy your constraint "5.0.0".
Required package "nystudio107/craft-retour" is in the lock file as "4.1.19" but that does not satisfy your constraint "5.0.3".
Required package "nystudio107/craft-seomatic" is in the lock file as "4.1.4" but that does not satisfy your constraint "5.1.5".
Required package "putyourlightson/craft-blitz" is in the lock file as "4.23.2" but that does not satisfy your constraint "^5.9.1".
Required package "spacecatninja/imager-x" is in the lock file as "4.4.1" but that does not satisfy your constraint "5.0.2".
Required package "topshelfcraft/wordsmith" is in the lock file as "4.5.0" but that does not satisfy your constraint "5.0.0".
Required package "verbb/super-table" is in the lock file as "3.0.15" but that does not satisfy your constraint "4.0.2". This usually
happens when composer files are incorrectly merged or the
composer.json file is manually edited. Read more about correctly
resolving merge conflicts
https://getcomposer.org/doc/articles/resolving-merge-conflicts.md and
prefer using the "require" command over editing the composer.json file
directly https://getcomposer.org/doc/03-cli.md#require-r Error:
Process completed with exit code 4.


This is my composer.json file:
{
    "require": {
        "airbrake/phpbrake": "^0.7.3",
        "bymayo/commerce-widgets": "3.0.0",
        "craftcms/ckeditor": "3.9.0",
        "craftcms/cms": "4.12.7",
        "craftcms/commerce": "4.6.13",
        "craftcms/contact-form": "3.1.0",
        "craftcms/contact-form-honeypot": "2.1.0",
        "enupal/translate": "3.1.0",
        "humantools/payrexx-craft": "*",
        "hybridinteractive/craft-contact-form-extensions": "4.2.2",
        "miranj/craft-obfuscator": "1.2.0",
        "nystudio107/craft-minify": "4.0.1",
        "nystudio107/craft-retour": "4.1.19",
        "nystudio107/craft-seomatic": "4.1.4",
        "ostark/craft-async-queue": "3.2.1",
        "putyourlightson/craft-blitz": "4.23.2",
        "spacecatninja/imager-x": "4.4.1",
        "topshelfcraft/wordsmith": "4.5.0",
        "verbb/super-table": "3.0.15",
        "vlucas/phpdotenv": "^5.4.0"
    },
    "config": {
        "sort-packages": true,
        "optimize-autoloader": true,
        "platform": {
            "php": "8.3"
        },
        "allow-plugins": {
            "craftcms/plugin-installer": true,
            "yiisoft/yii2-composer": true,
            "treeware/plant": true,
            "php-http/discovery": true
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ]
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://composer.craftcms.com",
            "canonical": false
        },
        {
            "type": "path",
            "url": "./plugins/payrexx-craft"
        }
    ]
}

I've tried everything, deleting the lockfile, regenerating it with composer update but this error won't go away and I cant see why.
When I look at this line:


Required package "craftcms/cms" is in the lock file as "4.12.7" but that does not satisfy your constraint "^5.0.0".


In composer.lock ther is no ^5.0.0 defined anywhere. I don't understand where this is coming from. I don't know what to do.
{
            "name": "craftcms/cms",
            "version": "4.12.7",
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/craftcms/cms/zipball/91eb1f4d7ca6ebe79ea9dcb950b1b113b8689363",
                "reference": "91eb1f4d7ca6ebe79ea9dcb950b1b113b8689363",
                "shasum": ""
            },
            "require": {
                "commerceguys/addressing": "^1.2",
                "composer/composer": "^2.7.0",
                "craftcms/plugin-installer": "~1.6.0",
                "craftcms/server-check": "~2.1.2",
                "creocoder/yii2-nested-sets": "~0.9.0",
                "elvanto/litemoji": "~4.3.0",
                "enshrined/svg-sanitize": "~0.19.0",
                "ext-bcmath": "*",
                "ext-curl": "*",
                "ext-dom": "*",
                "ext-intl": "*",
                "ext-json": "*",
                "ext-mbstring": "*",
                "ext-openssl": "*",
                "ext-pcre": "*",
                "ext-pdo": "*",
                "ext-zip": "*",
                "guzzlehttp/guzzle": "^7.2.0",
                "illuminate/collections": "^9.1.0",
                "mikehaertl/php-shellcommand": "^1.6.3",
                "moneyphp/money": "^4.0",
                "monolog/monolog": "^2.3",
                "php": "^8.0.2",
                "pixelandtonic/imagine": "~1.3.3.1",
                "samdark/yii2-psr-log-target": "^1.1.3",
                "seld/cli-prompt": "^1.0.4",
                "symfony/http-client": "^6.0.3",
                "symfony/var-dumper": "^5.0|^6.0",
                "symfony/yaml": "^5.2.3",
                "theiconic/name-parser": "^1.2",
                "twig/twig": "~3.14.0",
                "voku/stringy": "^6.4.0",
                "webonyx/graphql-php": "~14.11.5",
                "yiisoft/yii2": "~2.0.51.0",
                "yiisoft/yii2-debug": "~2.1.25.0",
                "yiisoft/yii2-queue": "~2.3.2",
                "yiisoft/yii2-symfonymailer": "^2.0.0"
            },
            "conflict": {
                "webonyx/graphql-php": "14.11.7"
            },
            "provide": {
                "bower-asset/inputmask": "5.0.9",
                "bower-asset/jquery": "3.6.1",
                "bower-asset/punycode": "2.3.1",
                "bower-asset/yii2-pjax": "2.0.8",
                "yii2tech/ar-softdelete": "1.0.4"
            },
            "suggest": {
                "ext-exif": "Adds support for parsing image EXIF data.",
                "ext-iconv": "Adds support for more character encodings than PHP’s built-in mb_convert_encoding() function, which Craft will take advantage of when converting strings to UTF-8.",
                "ext-imagick": "Adds support for more image processing formats and options."
            },
            "type": "library",
            "autoload": {
                "psr-4": {
                    "craft\\": "src/",
                    "yii2tech\\ar\\softdelete\\": "lib/ar-softdelete/src/"
                }
            },
            "license": [
                "proprietary"
            ],
            "authors": [
                {
                    "name": "Pixel & Tonic",
                    "homepage": "https://pixelandtonic.com/"
                }
            ],
            "description": "Craft CMS",
            "homepage": "https://craftcms.com",
            "keywords": [
                "cms",
                "craftcms",
                "yii2"
            ],
            "support": {
                "email": "support@craftcms.com",
                "issues": "https://github.com/craftcms/cms/issues?state=open",
                "forum": "https://craftcms.stackexchange.com/",
                "source": "https://github.com/craftcms/cms",
                "docs": "https://craftcms.com/docs/4.x/",
                "rss": "https://github.com/craftcms/cms/releases.atom"
            },
            "time": "2024-10-15T22:32:35+00:00"
        },

**Tags:** composer

---

## 1 answers

### Answer by username_1 on 2024-11-11. Score: 1 | Accepted answer

Try to remove `composer.lock` and nuke the `vendor` folder.

Then run `composer i`

To elaborate on your problem, you're probably running `composer i`/`composer update` in the wrong folder or it's using a global profile.

> **Comments:**
> **username_0**: Thank you. In my github deploy action there was indeed `composer update`. changed that to `composer install` and `rm -rf` the heck out of it. Now it works.  

---

