0

The crux of this matter is that composer is now not working. I get the following when I try to run almost any composer command. (This Drupal 9 site is a composer installed site, and I would like to keep it that way, if possible.) Your requirements could not be resolved to an installable set of packages.

Problem 1

  • Root composer.json requires ckeditor/autogrow, it could not be found in any version, there may be a typo in the package name. Problem 2
  • Root composer.json requires ckeditor/codemirror, it could not be found in any version, there may be a typo in the package name. Problem 3
  • Root composer.json requires ckeditor/fakeobjects, it could not be found in any version, there may be a typo in the package name. Problem 4
  • Root composer.json requires ckeditor/image, it could not be found in any version, there may be a typo in the package name. Problem 5
  • Root composer.json requires ckeditor/link, it could not be found in any version, there may be a typo in the package name. Problem 6
  • Root composer.json requires codemirror/codemirror, it could not be found in any version, there may be a typo in the package name. Problem 7
  • Root composer.json requires jquery/hotkeys, it could not be found in any version, there may be a typo in the package name. Problem 8
  • Root composer.json requires jquery/image-picker, it could not be found in any version, there may be a typo in the package name. Problem 9
  • Root composer.json requires jquery/inputmask, it could not be found in any version, there may be a typo in the package name. Problem 10
  • Root composer.json requires jquery/intl-tel-input, it could not be found in any version, there may be a typo in the package name. Problem 11
  • Root composer.json requires jquery/rateit, it could not be found in any version, there may be a typo in the package name. Problem 12
  • Root composer.json requires jquery/select2, it could not be found in any version, there may be a typo in the package name. Problem 13
  • Root composer.json requires jquery/textcounter, it could not be found in any version, there may be a typo in the package name. Problem 14
  • Root composer.json requires jquery/timepicker, it could not be found in any version, there may be a typo in the package name. Problem 15
  • Root composer.json requires progress-tracker/progress-tracker, it could not be found in any version, there may be a typo in the package name. Problem 16
  • Root composer.json requires signature_pad/signature_pad, it could not be found in any version, there may be a typo in the package name. Problem 17
  • Root composer.json requires svg-pan-zoom/svg-pan-zoom, it could not be found in any version, there may be a typo in the package name. Problem 18
  • Root composer.json requires tabby/tabby, it could not be found in any version, there may be a typo in the package name. Problem 19
  • Root composer.json requires tippyjs/6.x, it 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.

I have now:

  • Uninstalled webform (TG, I have not started using it!)
  • uninstalled and re-installed ckeditor
  • Checked composer.library.json and all the required libraries are there
  • Modified my website composer.json to reflect the changes needed as this instruction, but I cannot run composer update nor composer require wikimedia/composer-merge-plugin
  • Re-installed the Webform module, not all its sub-modules, like I did before (The Devel module has also been added as part of the original Webform install, but I have not touched it, and it is still there.)

Everything else on my Drupal 9, Ubuntu 20.04 is normal, but I do need to run a security update (from 9.4.2 to 9.4.3) which I also cannot do.

I have also tried to install the patch manually with curl https://www.drupal.org/files/issues/2021-09-15/3233119-8.x-5.x-2.patch | patch -p1 from the modules/contrib/webform directory, but this error is shown.

patching file composer.libraries.json Reversed (or previously applied)
patch detected! Assume -R? [n] y Hunk #1 succeeded at 73 (offset 7 lines). Hunk #2 succeeded at 91 (offset 7 lines).
Hunk #3 succeeded at 109 with fuzz 2 (offset 7 lines).
Hunk #4 succeeded at 127 (offset 7 lines).
Hunk #5 succeeded at 145 with fuzz 2 (offset 7 lines).
Hunk #6 succeeded at 163 with fuzz 2 (offset 7 lines).
Hunk #7 succeeded at 181 with fuzz 2 (offset 7 lines).
Hunk #8 succeeded at 199 (offset 7 lines).
Hunk #9 succeeded at 217 (offset 7 lines).
Hunk #10 succeeded at 235 (offset 7 lines).
Hunk #11 succeeded at 253 (offset 7 lines).
Hunk #12 succeeded at 271 with fuzz 2 (offset 7 lines).
Hunk #13 succeeded at 289 (offset 7 lines).
Hunk #14 succeeded at 307 (offset 7 lines).
Hunk #15 succeeded at 325 (offset 7 lines).
Hunk #16 succeeded at 343 (offset 7 lines).
Hunk #17 succeeded at 361 (offset 7 lines).
Hunk #18 succeeded at 379 (offset 7 lines).
Hunk #19 succeeded at 397 (offset 7 lines).
Hunk #20 succeeded at 415 (offset 7 lines).
Hunk #21 succeeded at 433 with fuzz 2 (offset 7 lines).
Hunk #22 succeeded at 451 (offset 7 lines).
Hunk #23 succeeded at 469 with fuzz 1 (offset 7 lines). can't find file to patch at input line 239 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/src/Commands/WebformCliService.php b/src/Commands/WebformCliService.php |index 3ce05014a..87eb562a6 100644 |--- a/src/Commands/WebformCliService.php |+++ b/src/Commands/WebformCliService.php -------------------------- File to patch: composer.libraries.json patching file composer.libraries.json Hunk #1 FAILED at 1204. 1 out of 1 hunk FAILED -- saving rejects to file composer.libraries.json.rej

I know just so much about programming / script writing that I am actually dangerous.

I looked at the patch file and at the end the is a statement that starts with a opening curly bracket, but then there is no ending curly bracket but just some closing square brackets. Is this correct?

I really would appreciate some help with this. My Drupal site building has now scratched to a halt when otherwise I was managing quite nicely.

As an addendum I also ran composer diagnose, and this is the output.

Checking composer.json: WARNING
require.ckeditor/autogrow : unbound version constraints () should be avoided
require.ckeditor/codemirror : unbound version constraints (
) should be avoided
require.ckeditor/fakeobjects : unbound version constraints () should be avoided
require.ckeditor/image : unbound version constraints (
) should be avoided
require.ckeditor/link : unbound version constraints () should be avoided
require.codemirror/codemirror : unbound version constraints (
) should be avoided
require.jquery/hotkeys : unbound version constraints () should be avoided
require.jquery/image-picker : unbound version constraints (
) should be avoided
require.jquery/inputmask : unbound version constraints () should be avoided
require.jquery/intl-tel-input : unbound version constraints (
) should be avoided
require.jquery/rateit : unbound version constraints () should be avoided
require.jquery/select2 : unbound version constraints (
) should be avoided
require.jquery/textcounter : unbound version constraints () should be avoided
require.jquery/timepicker : unbound version constraints (
) should be avoided
require.progress-tracker/progress-tracker : unbound version constraints () should be avoided
require.signature_pad/signature_pad : unbound version constraints (
) should be avoided
require.svg-pan-zoom/svg-pan-zoom : unbound version constraints () should be avoided
require.tabby/tabby : unbound version constraints (
) should be avoided
require.tippyjs/6.x : unbound version constraints (*) should be avoided
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 5781 ........
Dev Public Key Fingerprint: 4AC4...........
Checking composer version: You are not running the latest stable version, run composer self-update to update (2.3.7 => 2.3.10)
Composer version: 2.3.7
PHP version: 7.4.3
PHP binary path: /usr/bin/php7.4
OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020
cURL version: 7.68.0 libz 1.2.11 ssl OpenSSL/1.1.1f
zip: extension present, unzip present, 7-Zip not available

2
  • As an addendum, if it can help: I also ran composer diagnose: Jul 22, 2022 at 13:48
  • 1
    Dependency manager (Composer, in this case) support questions that do not include the configuration files are always a bit of a mystery.
    – cilefen
    Jul 22, 2022 at 15:33

1 Answer 1

1

When you install the Webform module with composer, there are two parts:

  1. Webform module and its submodules
  2. Various libraries for additional features (these are installed by merge)

It seems like somehow the library merge is now causing an error.

If you are using version control

Just roll back composer.json and composer.lock and you should be able to update.

This is why using a version control system like git is great.

If you are not using version control

You'll have to fix the composer.json manually.

Normally, if the webform libraries are correctly installed, you should have a section like this:

"merge-plugin": {
    "include": [
        "web/modules/contrib/webform/composer.libraries.json"
    ]
},

After backing up my files, I would try deleting this section, deleting composer.lock, and then trying the composer update command again.

8
  • 1
    Make sure you uninstall the webform module before rolling back. If you roll back composer.json, the webform modules will not be present, and you will not be able to uninstall it, if you didn't prior to rollback.
    – Jaypan
    Jul 22, 2022 at 14:42
  • Thank you Patrick and Jaypan for your efforts. Unfortunately none of this work. I have deleted composer.lock, but composer does not re-create it again. Could I try deleting the offending libraries IN composer.json (as I do not have Webform installed, do they still have to be part of my Drupal installations?) and then run composer self-update or composer install again. In the meantime, as my drupal site is sort of looking okay presently, and certainly not broken in totality, I am going to upload it to my hosting site, which means I can repair this dev site without risking losing ALL my work. Jul 23, 2022 at 13:50
  • Try running composer install, which should generate a composer.lock if none is present. Jul 23, 2022 at 13:53
  • Thanks Patrick - as stated just now: it does not work!! Jul 23, 2022 at 13:54
  • "It does not work" is not a helpful comment. What doesn't work? What is the error? In any case, the libraries do not need to be in composer.json if you have removed Webform. So remove the libraries from composer.json and try running composer install again. If that doesn't work, try deleting the vendor/ directory as well and then running composer install again. Jul 23, 2022 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.