Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
when I try to install the new version 1.1 with composer i get:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- drupal/ace_editor 1.1.0 requires ajaxorg/ace-builds ~1.4.0 -> no matching package found.
- drupal/ace_editor 1.x-dev requires ajaxorg/ace-builds ~1.4.0 -> no matching package found.
- Installation request for drupal/ace_editor ^1.1 -> satisfiable by drupal/ace_editor[1.x-dev, 1.1.0].
while with version 1.0 there are no worries ...
Comment | File | Size | Author |
---|---|---|---|
#23 | status_report.jpg | 15.4 KB | interdruper |
#9 | 3022330-9.patch | 1.18 KB | Rajab Natshah |
Comments
Comment #2
mmjvb CreditAttribution: mmjvb as a volunteer commentedConfirmed.
The definition of that package is in the composer.json of this module:
Adding the definition to your project will allow it to install:
See https://getcomposer.org/doc/faqs/why-can%27t-composer-load-repositories-...
Comment #3
steveoriolOK, I comfirm that after add the definition of the "ace-builds" package is in the composer.json of the drupal project, "composer update" works well. Thank you.
composer update
Comment #4
interdruper CreditAttribution: interdruper at Interdruper commentedComposer cannot load repositories recursively... you need to update the composer.json of your project, adding the ace repository (see #3) or using the merge-plugin under the 'extra' section of your project's composer.json:
Comment #5
therealbene CreditAttribution: therealbene commentedI think this extra step of add Composer repository or merge-plugin should be added to the documentation/readme to help new users.
Comment #6
mmjvb CreditAttribution: mmjvb as a volunteer commentedDisagree with works as designed. The readme doesn't specify the dependency. Nor does it inform you about the need to add it to the composer.json of your project. There are several options depending on how your project is set up. Indeed, this should be properly documented.
Consider this a bug because the currently documented instructions lead to failure!
Comment #7
malcolm_p CreditAttribution: malcolm_p commentedI agree that this is problematic as it also breaks the update process. I can't add the merge-plugin when the currently installed version of ace_editor doesn't have this composer.json.
Furthermore, I was using "bower-asset/ace-builds" from:
"repositories": {
"asset-packagist": {
"type": "composer",
"url": "https://asset-packagist.org"
}
}
which is a very convenient way to use all sorts of JS asset dependencies with Composer.
Comment #8
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedWith the following command, we could add the https://asset-packagist.org composer repositories to any composer project
Comment #9
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedAttached a patch which updates the ACE composer to a better way
Comment #10
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #11
SpiesInOrbit CreditAttribution: SpiesInOrbit commentedI had to add a label for it to work. It threw a bad json error. Don't know if the "ace-builds" makes a difference.
Comment #12
Mohammed J. RazemHi.
I really recommend you standardize the
composer.json
repositories and use "npm-asset/ace-builds" instead of your custom repository.Patch #9 fixes this.
Comment #13
ydahirtbc +1 for patch in #9. definitely the preferred method. Please commit.
Comment #14
interdruper CreditAttribution: interdruper at Interdruper commentedI have temporarily committed the patch #9 to the 8.x-1.x branch for letting people check it under the usual Drupal packaging, because I have not been able to get it working.
In a clean 8.6.17 installation:
composer require 'drupal/ace_editor:1.x-dev'
fails unless the asset-packagist repo is added in the composer.json of the Drupal project:
So as indicated in comment #3, you need to modify the project's composer.json prior to install the module. But with the comment #3 method, no patch like #9 is required to 8.x-1.1.
But the main problem with the patch #9 in my case is that composer update does not copy the Ace library to the libraries/ace folder... something is not going well with "composer/installers" and/or "drupal/drupal-library-installer-plugin", but even with composer -vvv option I could not found any hint of why it is failing...
Comment #15
malcolm_p CreditAttribution: malcolm_p commentedRegarding #14 the library location would need to be managed from the project composer.json file as well like the following:
This should definitely be documented in the readme installation steps though.
Comment #16
elgandoz CreditAttribution: elgandoz as a volunteer commentedMaybe I'm getting something wrong, but using
"drupal-composer/drupal-project"
the general libraries path is already defined:Nevertheless, using
"public_html/libraries/ace": ["npm-asset/ace-builds"]
still install the library invendor/npm-asset/
instead ofpublic_html/libraries/
.I added the asset repo under "repositories".
Comment #17
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedThey should be in the Root composer.json, it did not work when we have it only the module
as the composer dose not merge the extra values in the root composer and the module composer
my current fix its to have that too in the root composer.
Comment #18
mmjvb CreditAttribution: mmjvb as a volunteer commentedIn addition the specific path for ace needs to be in front of the generic paths.
Comment #19
mrP CreditAttribution: mrP commented+1 RTBC
I would suggest an update to the README installation section that includes the step of adding the packagist repository as noted in #8
Comment #21
interdruper CreditAttribution: interdruper at Interdruper commentedCommitted to dev. Added
oomphinc/composer-installers-extender
package dependency to follow https://www.drupal.org/docs/develop/using-composer/using-composer-to-install-drupal-and-manage-dependencies#third-party-libraries .README updated with installation instructions. Thanks everybody.
Comment #22
mmjvb CreditAttribution: mmjvb as a volunteer commentedStill missing the most important part: renaming the library from ace-builds to ace as mentioned in #15. As mentioned in #18 that needs to be in front of generic type paths.
Comment #23
interdruper CreditAttribution: interdruper at Interdruper commentedmmjvb, this is not required, since fortunately the module searches for the library recursively inside the /libraries path, and the library is recognized regardless of the name of the folder in which it was installed.
Anyway, in the link provided in the README (https://www.drupal.org/docs/develop/using-composer/using-composer-to-install-drupal-and-manage-dependencies#third-party-libraries, section 4) explains how to set the folder to an specific folder name, if the user wants to.
Comment #24
interdruper CreditAttribution: interdruper at Interdruper commentedComment #25
mmjvb CreditAttribution: mmjvb as a volunteer commentedGlad to hear that it is not a requirement. That requirement should be removed from the project page. Currently that contradicts with the information provided in the readme.
Comment #26
interdruper CreditAttribution: interdruper at Interdruper commentedProject page updated. Thanks for pointing it out.
Comment #28
Tabestan CreditAttribution: Tabestan commentedThis is still broken. The readme needs to be updated. The module cannot be installed with the current instructions.
Comment #29
ahillio CreditAttribution: ahillio commentedIt's not still broken (though I also thought it was at first)... this patch is only part of the solution, the other part of the solution is to edit your composer.json file to make it work with asset-packagist. This is explained in the README.txt which the project page mentions. For convenience I'm pasting those here...
Edit composer.json like so:
To the "extra" section: add the following:
To the "repositories" section: add the following:
Comment #30
mmjvb CreditAttribution: mmjvb as a volunteer commentedSee #8 for adding asset as repository.
Unless you want to get into a fight about proper json syntx, the command in #8 deals with it for all situations. When manually editing the repositories section you need to make sure it is valid json. Adding the lines as suggested in #29 is NOT valid for all json out there.
Comment #31
ressa CreditAttribution: ressa at Ardea commentedI also couldn't install the module, neither in Drupal 9, nor in Drupal 10, so I have created #3353188: Update README.md Composer steps, and format to Markdown.