1

I am getting this error when upgrading craft CMS, could anyone please assist.

<warning>Package "craftcms/vue-asset" listed for update is not installed. Ignoring.</warning>
<warning>Package "yiisoft/yii2-shell" listed for update is not installed. Ignoring.</warning>
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1 - Conclusion: don't install symfony/yaml v5.4.3 - Conclusion: don't install symfony/yaml v5.4.2 - Conclusion: don't install symfony/yaml v5.4.0 - Conclusion: don't install symfony/yaml v5.3.14 - Conclusion: don't install symfony/yaml v5.3.13 - Conclusion: don't install symfony/yaml v5.3.11 - Conclusion: don't install symfony/yaml v5.3.6 - Conclusion: don't install symfony/yaml v5.3.4 - Conclusion: remove laravel/homestead v7.20.0 - Conclusion: don't install symfony/yaml v4.4.37 - Conclusion: don't install symfony/yaml v5.3.3 - Conclusion: don't install symfony/yaml v4.4.36 - Conclusion: don't install symfony/yaml v5.3.2 - Conclusion: don't install symfony/yaml v4.4.34 - Conclusion: don't install symfony/yaml v5.3.0 - Conclusion: don't install symfony/yaml v4.4.29 - Conclusion: don't install symfony/yaml v5.2.14 - Conclusion: don't install symfony/yaml v4.4.27

composer.json:

{
  "require": {
    "craftcms/cms": "3.5.8",
    "vlucas/phpdotenv": "^2.4.0",
    "craftcms/aws-s3": "1.2.11",
    "verbb/field-manager": "2.2.0",
    "craftcms/contact-form": "2.2.7",
    "craftcms/contact-form-honeypot": "1.0.2",
    "nystudio107/craft-cookies": "1.1.12",
    "matt-west/craft-recaptcha": "1.5.0",
    "fruitstudios/linkit": "1.1.11",
    "laravel/homestead": "^7.20",
    "craftcms/redactor": "2.7.4"
  },
  "autoload": {
    "psr-4": {
      "modules\\": "modules/"
    }
  },
  "config": {
    "optimize-autoloader": true,
    "platform": {
      "php": "7.0"
    }
  },
  "scripts": {
    "post-root-package-install": [
      "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ]
  }
}

Full error:

Skipping database backup.
Performing update with Composer ... error: An error occurred

Output:

<warning>Package "craftcms/vue-asset" listed for update is not installed. Ignoring.</warning> <warning>Package "yiisoft/yii2-shell" listed for update is not installed. Ignoring.</warning> Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.

Problem 1 - Conclusion: don't install symfony/yaml v5.4.3 - Conclusion: don't install symfony/yaml v5.4.2 - Conclusion: don't install symfony/yaml v5.4.0 - Conclusion: don't install symfony/yaml v5.3.14 - Conclusion: don't install symfony/yaml v5.3.13 - Conclusion: don't install symfony/yaml v5.3.11 - Conclusion: don't install symfony/yaml v5.3.6 - Conclusion: don't install symfony/yaml v5.3.4 - Conclusion: remove laravel/homestead v7.20.0 - Conclusion: don't install symfony/yaml v4.4.37 - Conclusion: don't install symfony/yaml v5.3.3 - Conclusion: don't install symfony/yaml v4.4.36 - Conclusion: don't install symfony/yaml v5.3.2 - Conclusion: don't install symfony/yaml v4.4.34 - Conclusion: don't install symfony/yaml v5.3.0 - Conclusion: don't install symfony/yaml v4.4.29 - Conclusion: don't install symfony/yaml v5.2.14 - Conclusion: don't install symfony/yaml v4.4.27 - Conclusion: don't install symfony/yaml v5.2.12 - Conclusion: don't install symfony/yaml v4.4.26 - Conclusion: don't install symfony/yaml v5.2.11 - Conclusion: don't install symfony/yaml v4.4.25 - Conclusion: don't install symfony/yaml v5.2.10 - Conclusion: don't install symfony/yaml v4.4.24 - Conclusion: don't install symfony/yaml v5.2.9 - Conclusion: don't install symfony/yaml v4.4.22 - Conclusion: don't install symfony/yaml v5.2.7 - Conclusion: don't install symfony/yaml v4.4.21 - Conclusion: don't install symfony/yaml v5.2.5 - Conclusion: don't install symfony/yaml v4.4.20 - Conclusion: don't install symfony/yaml v5.2.4 - Conclusion: don't install symfony/yaml v4.4.19 - Conclusion: don't install symfony/yaml v5.2.3 - Conclusion: don't install symfony/yaml v4.4.18 - Installation request for craftcms/cms 3.7.27.2 -> satisfiable by craftcms/cms[3.7.27.2]. - Installation request for laravel/homestead ^7.20 -> satisfiable by laravel/homestead[v7.20.0]. - laravel/homestead v7.20.0 requires symfony/yaml ~3.3|~4.0 -> satisfiable by symfony/yaml[v3.3.6, v4.4.37, v4.4.36, v4.4.34, v4.4.29, v4.4.27, v4.4.26, v4.4.25, v4.4.24, v4.4.22, v4.4.21, v4.4.20, v4.4.19, v4.4.18, v4.4.17, v4.4.16, v4.4.15, v4.4.14, v4.4.13, v4.4.12, v4.4.11, v4.4.10, v4.4.9, v4.4.8, v4.4.7, v4.4.6, v4.4.5, v4.4.4, v4.4.3, v4.4.2, v4.4.1, v4.4.0, v4.3.11, v4.3.10, v4.3.9, v4.3.8, v4.3.7, v4.3.6, v4.3.5, v4.3.4, v4.3.3, v4.3.2, v4.3.1, v4.3.0, v4.2.12, v4.2.11, v4.2.10, v4.2.9, v4.2.8, v4.2.7, v4.2.6, v4.2.5, v4.2.4, v4.2.3, v4.2.2, v4.2.1, v4.2.0, v4.1.12, v4.1.11, v4.1.10, v4.1.9, v4.1.8, v4.1.7, v4.1.6, v4.1.5, v4.1.4, v4.1.3, v4.1.2, v4.1.1, v4.1.0, v4.0.15, v4.0.14, v4.0.13, v4.0.12, v4.0.11, v4.0.10, v4.0.9, v4.0.8, v4.0.7, v4.0.6, v4.0.5, v4.0.4, v4.0.3, v4.0.2, v4.0.1, v4.0.0, v3.4.47, v3.4.46, v3.4.45, v3.4.44, v3.4.43, v3.4.42, v3.4.41, v3.4.40, v3.4.39, v3.4.38, v3.4.37, v3.4.36, v3.4.35, v3.4.34, v3.4.33, v3.4.32, v3.4.31, v3.4.30, v3.4.29, v3.4.28, v3.4.27, v3.4.26, v3.4.25, v3.4.24, v3.4.23, v3.4.22, v3.4.21, v3.4.20, v3.4.19, v3.4.18, v3.4.17, v3.4.16, v3.4.15, v3.4.14, v3.4.13, v3.4.12, v3.4.11, v3.4.10, v3.4.9, v3.4.8, v3.4.7, v3.4.6, v3.4.5, v3.4.4, v3.4.3, v3.4.2, v3.4.1, v3.4.0, v3.3.18, v3.3.17, v3.3.16, v3.3.15, v3.3.14, v3.3.13, v3.3.12, v3.3.11, v3.3.10, v3.3.9, v3.3.8, v3.3.7, v3.3.5, v3.3.4, v3.3.3, v3.3.2, v3.3.1, v3.3.0]. - Can only install one of: symfony/yaml[v4.4.17, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.16, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.15, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.14, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.13, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.12, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.11, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.10, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.9, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.8, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.7, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.6, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.5, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.4, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.3, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.2, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.1, v5.2.1]. - Can only install one of: symfony/yaml[v4.4.0, v5.2.1]. - Can only install one of: symfony/yaml[v4.3.11, v5.2.1]. - Can only install one of: symfony/yaml[v4.3.10, v5.2.1]. - Can only install one of: symfony/yaml[v4.3.9, v5.2.1]. - Can only install one of: symfony/yaml[v4.3.8, v5.2.1]. - Can only install one of: symfony/yaml[v4.3.7, v5.2.1]. - Can only install one of: symfony/yaml[v4.3.6, v5.2.1]. - Can only install one of: symfony/yaml[v4.3.5, v5.2.1]. - Can only install one of: symfony/yaml[v4.3.4, v5.2.1]. - Can only install one of: symfony/yaml[v4.3.3, v5.2.1]. - Can only install one of: symfony/yaml[v4.3.2, v5.2.1]. - Can only install one of: symfony/yaml[v4.3.1, v5.2.1]. - Can only install one of: symfony/yaml[v4.3.0, v5.2.1]. - Can only install one of: symfony/yaml[v4.2.12, v5.2.1]. - Can only install one of: symfony/yaml[v4.2.11, v5.2.1]. - Can only install one of: symfony/yaml[v4.2.10, v5.2.1]. - Can only install one of: symfony/yaml[v4.2.9, v5.2.1]. - Can only install one of: symfony/yaml[v4.2.8, v5.2.1]. - Can only install one of: symfony/yaml[v4.2.7, v5.2.1]. - Can only install one of: symfony/yaml[v4.2.6, v5.2.1]. - Can only install one of: symfony/yaml[v4.2.5, v5.2.1]. - Can only install one of: symfony/yaml[v4.2.4, v5.2.1]. - Can only install one of: symfony/yaml[v4.2.3, v5.2.1]. - Can only install one of: symfony/yaml[v4.2.2, v5.2.1]. - Can only install one of: symfony/yaml[v4.2.1, v5.2.1]. - Can only install one of: symfony/yaml[v4.2.0, v5.2.1]. - Can only install one of: symfony/yaml[v4.1.12, v5.2.1]. - Can only install one of: symfony/yaml[v4.1.11, v5.2.1]. - Can only install one of: symfony/yaml[v4.1.10, v5.2.1]. - Can only install one of: symfony/yaml[v4.1.9, v5.2.1]. - Can only install one of: symfony/yaml[v4.1.8, v5.2.1]. - Can only install one of: symfony/yaml[v4.1.7, v5.2.1]. - Can only install one of: symfony/yaml[v4.1.6, v5.2.1]. - Can only install one of: symfony/yaml[v4.1.5, v5.2.1]. - Can only install one of: symfony/yaml[v4.1.4, v5.2.1]. - Can only install one of: symfony/yaml[v4.1.3, v5.2.1]. - Can only install one of: symfony/yaml[v4.1.2, v5.2.1]. - Can only install one of: symfony/yaml[v4.1.1, v5.2.1]. - Can only install one of: symfony/yaml[v4.1.0, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.15, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.14, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.13, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.12, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.11, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.10, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.9, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.8, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.7, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.6, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.5, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.4, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.3, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.2, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.1, v5.2.1]. - Can only install one of: symfony/yaml[v4.0.0, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.47, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.46, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.45, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.44, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.43, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.42, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.41, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.40, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.39, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.38, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.37, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.36, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.35, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.34, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.33, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.32, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.31, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.30, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.29, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.28, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.27, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.26, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.25, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.24, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.23, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.22, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.21, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.20, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.19, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.18, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.17, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.16, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.15, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.14, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.13, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.12, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.11, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.10, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.9, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.8, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.7, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.6, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.5, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.4, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.3, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.2, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.1, v5.2.1]. - Can only install one of: symfony/yaml[v3.4.0, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.18, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.17, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.16, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.15, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.14, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.13, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.12, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.11, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.10, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.9, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.8, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.7, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.6, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.5, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.4, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.3, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.2, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.1, v5.2.1]. - Can only install one of: symfony/yaml[v3.3.0, v5.2.1]. - Can only install one of: symfony/yaml[v5.2.1, v3.3.6]. - Can only install one of: symfony/yaml[v5.2.1, v3.3.6]. - craftcms/cms 3.7.27.2 requires symfony/yaml ^5.2.1 -> satisfiable by symfony/yaml[v5.4.3, v5.4.2, v5.4.0, v5.3.14, v5.3.13, v5.3.11, v5.3.6, v5.3.4, v5.3.3, v5.3.2, v5.3.0, v5.2.14, v5.2.12, v5.2.11, v5.2.10, v5.2.9, v5.2.7, v5.2.5, v5.2.4, v5.2.3, v5.2.2, v5.2.1]. - Conclusion: don't install symfony/yaml v5.2.2

<warning>Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.</warning>

MoritzLost
  • 11,215
  • 5
  • 22
JohnC
  • 61
  • 4

1 Answers1

1

This error is usually caused by some outdated dependencies or some mismatch between your installed dependencies and your composer.json and composer.lock files. It could also be that the Craft updater is trying to update the specified packages for some reason, but they're not installed, so Composer is throwing a warning. For example, if you check the craftcms/vue-asset repository, you can see it's deprecated and should not be used anymore.

To fix this error, you need to figure out if this package is required by either your project itself or by another dependency (for instance, a plugin) – probably the latter. You can ask Composer for this information:

composer why craftcms/vue-asset

If the package is installed in your project itself, you can simply remove it. Of course you'll need to check if it's actually in use and if so, update this part of the codebase to use the recommended alternative instead.

composer remove craftcms/vue-asset

If the package is required by a dependency, you need to either remove or update that dependency.


To find out more about the errors you're getting, make sure to run the update method from a shell, not from the backend, so you can see all error messages:

php craft update all

You can also try to update through Composer directly, this will tell you what conflicts are preventing the update:

composer update --with-all-dependencies --dry-run

If this succeeds with no problems, run it again without --dry-run.


As a sidenote, the error you listed doesn't exist in the current Composer version any more, make sure to update to the latest version:

composer self-update

Update regarding version conflicts

The error messages you're receiving means there's a conflict between some dependencies. To resolve this, you need to update and/or remove dependencies until you have a set of dependencies that resolves to an installable set of dependencies.

In your concrete case, it looks like the problem is Laravel Homestead. Your composer.json requires laravel/homestead:^7.2.0, which is very outdated. This version requires symfony/yaml ~3.3|~4.0 while the version of craftcms/craft you're trying to update to requires the same package in version ^5.2.1. Satisfying both of those isn't possible, so Composer can't resolve your dependencies.

Either update or remove laravel/homestead, then try the Craft update again. If you get more errors, check which dependency is causing them and resolve the problem in the same way. Keep going until you have a set of dependencies that will update cleanly.

MoritzLost
  • 11,215
  • 5
  • 22
  • I am getting this error when i tried to remove the package Removal failed, reverting ./composer.json to its original content. – JohnC Jun 01 '22 at 13:06
  • 1
    @JohnC You can't remove a package unless it's installed in your project directly, if you try to remove a package that is installed by a dependency you would get this error. Try the why command (see above) to find out which dependency is installing the packages that are causing trouble and then remove that dependency. – MoritzLost Jun 01 '22 at 15:25
  • I tried the why command but its showing the package is not installed. – JohnC Jun 03 '22 at 09:02
  • @JohnC Then you don't need to remove it. What is the problem? – MoritzLost Jun 03 '22 at 10:07
  • I am trying to upgrade the CraftCMS but I am getting this error and its blocking the upgrade. This is the issue I am getting now on the site, can you please help us to resolve this. – JohnC Jun 07 '22 at 08:35
  • Problem 1 - Conclusion: don't install symfony/yaml v5.4.3 - Conclusion: don't install symfony/yaml v5.4.2 – JohnC Jun 07 '22 at 08:35
  • Conclusion: don't install symfony/yaml v5.3.4
    • Conclusion: remove laravel/homestead v7.20.0
  • – JohnC Jun 07 '22 at 08:35
  • Package "craftcms/vue-asset" listed for update is not installed. Ignoring. Package "yiisoft/yii2-shell" listed for update is not installed. Ignoring. Loading composer repositories with package information – JohnC Jun 07 '22 at 08:36
  • @JohnC What command is producing this error for you? Have you tried the steps recommended in my answer? Please add your composer.json to your answer as well, this will make it easier to see what's going on. – MoritzLost Jun 07 '22 at 09:06
  • I am using php craft update craft command to update and I am getting this erro. Yes I tried the answer and got the issue – JohnC Jun 07 '22 at 10:31
  • @JohnC I've updated my answer with some guidance on resolving the dependency version conflicts you're seeing. – MoritzLost Jun 07 '22 at 12:39
  • @MortizLost I have removed the laravel/homestead and again tried the update, got the error – JohnC Jun 07 '22 at 15:31
  • applying m210613_145522_sortable_global_sets > add column sortOrder smallint UNSIGNED AFTER fieldLayoutId to table {{%globalsets}} ...Exception: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'sortOrder' – JohnC Jun 07 '22 at 15:32
  • @JohnC That's a completely separate issue, please open a new question for this. If your current problem is solved, don't forget to mark the answer as accepted. – MoritzLost Jun 08 '22 at 07:49
  • @MozitzLost I have removed the laravel/homestead application after that, I am getting this issue. – JohnC Jun 08 '22 at 08:55