craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.27k stars 635 forks source link

Updating plugins "Composer was unable to install the updates due to a dependency conflict" #5478

Closed davist11 closed 4 years ago

davist11 commented 4 years ago

Description

I'm trying to update two plugins (Super Table and Navigation) in the CP and getting a dependency conflict:

Composer output: Cannot create cache directory /var/www/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /var/www/.composer/cache/files/, or directory is not writable. Proceeding without cache
Cannot create cache directory /var/www/.composer/cache/repo/https---composer.craftcms.com/, or directory is not writable. Proceeding without cache
Cannot create cache directory /var/www/.composer/cache/files/, or directory is not writable. Proceeding without cache
Package "craftcms/vue-asset" listed for update is not installed. Ignoring.
Package "danielstjules/stringy" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package codeception/codeception could not be found in any version, there may be a typo in the package name.
Problem 2
- The requested package codeception/codeception could not be found in any version, there may be a typo in the package name.
Problem 3
- The requested package behat/gherkin could not be found in any version, there may be a typo in the package name.
Problem 4
- The requested package codeception/phpunit-wrapper could not be found in any version, there may be a typo in the package name.
Problem 5
- The requested package codeception/stub could not be found in any version, there may be a typo in the package name.
Problem 6
- The requested package facebook/webdriver could not be found in any version, there may be a typo in the package name.
Problem 7
- The requested package hoa/consistency could not be found in any version, there may be a typo in the package name.
Problem 8
- The requested package hoa/console could not be found in any version, there may be a typo in the package name.
Problem 9
- The requested package hoa/event could not be found in any version, there may be a typo in the package name.
Problem 10
- The requested package hoa/exception could not be found in any version, there may be a typo in the package name.
Problem 11
- The requested package hoa/file could not be found in any version, there may be a typo in the package name.
Problem 12
- The requested package hoa/iterator could not be found in any version, there may be a typo in the package name.
Problem 13
- The requested package hoa/protocol could not be found in any version, there may be a typo in the package name.
Problem 14
- The requested package hoa/stream could not be found in any version, there may be a typo in the package name.
Problem 15
- The requested package hoa/ustring could not be found in any version, there may be a typo in the package name.

Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see for more details.
- It's a private package and you forgot to add a custom repository to find it

Read for further common problems.
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.

I wasn't sure if it's something with Verbb plugins specifically or something on our end.

Steps to reproduce

  1. Try to update from Navigation 1.1.13 -> 1.27 or
  2. Try to update from Super Table 2.3.0 -> 2.3.3

Additional info

Here is our composer.json file:

{
  "require": {
    "clubstudioltd/craft-asset-rev": "6.0.2",
    "craftcms/cms": "3.3.20.1",
    "craftcms/redactor": "2.4.0",
    "dolphiq/redirect": "1.0.23",
    "rias/craft-width-fieldtype": "1.0.6",
    "shennyg/azure-blob-remote-volume": "1.0.2",
    "solspace/craft3-calendar": "2.0.25",
    "superbig/craft-vzaddress": "^2.0",
    "verbb/navigation": "1.1.13",
    "verbb/super-table": "2.3.0",
    "viget/craft-video-embed": "^1.2",
    "vlucas/phpdotenv": "^3.4"
  },
  "autoload": {
    "psr-4": {
      "modules\\clientname\\api\\": "modules/clientname/api/src/",
      "modules\\clientname\\sso\\": "modules/clientname/sso/src/",
      "modules\\clientname\\web\\": "modules/clientname/web/src/",
      "modules\\clientname\\blob\\": "modules/clientname/blob/src/",
      "modules\\clientname\\personalization\\": "modules/clientname/personalization/src/"
    }
  },
  "config": {
    "sort-packages": true,
    "optimize-autoloader": true
  },
  "scripts": {
    "post-root-package-install": [
      "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ]
  },
  "require-dev": {
    "codeception/codeception": "^3.1.0",
    "yiisoft/yii2-shell": "^2.0"
  }
}
Asset Rev 6.0.2
Azure Blob Remote Volume 1.0.2
Calendar 2.0.25
Navigation 1.1.13
Redactor 2.4.0
Redirect plugin for Craft 3 1.0.23
Super Table 2.3.0
Video Embed 1.2.1
VZ Address 2.0.2
Width Fieldtype 1.0.6

Let me know if there is any additional information I can provide.

brandonkelly commented 4 years ago

I just tried running composer update on the exact same composer.json file, and everything installed without a hitch. Can you try running composer clear-caches and then try again?

davist11 commented 4 years ago

Huh, that seems to have done it. Thanks!