npm-asset/ace-builds ~1.0 -> could not be found in any version

Created on 1 November 2023, about 1 year ago
Updated 19 June 2024, 5 months ago

Problem/Motivation

Problem 1
- Root composer.json requires drupal/ace_editor ^2.0@beta -> satisfiable by drupal/ace_editor[2.0.0-beta1, 2.0.0-beta2].
- drupal/ace_editor[2.0.0-beta1, ..., 2.0.0-beta2] require npm-asset/ace-builds ~1.0 -> could not be found in any version, there may be a typo in the package name.

Steps to reproduce

composer require 'drupal/ace_editor:^2.0@beta'

Proposed resolution

should this point to ajaxorg/ace-builds

Remaining tasks

  • ✅ File an issue
  • ➖ Addition/Change/Update/Fix
  • ➖ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ➖ Code review by maintainers
  • ➖ Full testing and approval
  • ➖ Credit contributors
  • ➖ Review with the product owner
  • ➖ Release notes snippet
  • ❌ Release

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
🐛 Bug report
Status

Closed: won't fix

Version

2.0

Component

Code

Created by

🇺🇸United States CProfessionals

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @CProfessionals
  • First commit to issue fork.
  • Status changed to Needs review about 1 year ago
  • 🇮🇳India viren18febS

    Hi @CProfessionals

    I have updated the json file as per Proposed resolution & patch added, please review.

  • 🇺🇸United States j2 Utah, USA

    This module does not currently work with Drupal 10 due to the inability to update it.

  • 🇷🇴Romania rares petru samartean

    To anyone else having trouble with this, from the module readme:

    If you want Composer to automatically download the Ace Library
    to the /libraries folder when installing the module, you must
    update your root project composer.json in the following sections:

    "extra" section: add the following:

    "installer-types": [
    "npm-asset"
    ],
    "installer-paths": {
    "libraries/{$name}": [
    "type:drupal-library",
    "type:npm-asset"
    ]
    }

    "repositories" section: add the following:

    "assets": {
    "type": "composer",
    "url": "https://asset-packagist.org"
    }

    (see details: https://www.drupal.org/docs/develop/using-composer/using-composer-to-ins... )

    After the previous updates, run:

    $ composer require 'drupal/ace_editor:^1.0'

    or

    $ composer require 'drupal/ace_editor:1.x-dev'

    The Ace library will be downloaded to the /libraries folder
    with '$ composer install/update'. Only one version
    (minified, noconflict...) is required. Other folders
    (including /demo) can be removed.

  • 🇷🇴Romania rares petru samartean

    Nevermind my above comment. It seems that text editor code is not yet adapted, to me at least. I don't know exactly how external libraries loading works but it seems the module is currently trying to load libraries that aren't defined anywhere, in src/Plugin/Editor/AceEditor.php line 166:

        $theme_exist = \Drupal::service('library.discovery')->getLibraryByName('ace_editor', 'theme.' . $theme);
        $mode_exist = \Drupal::service('library.discovery')->getLibraryByName('ace_editor', 'mode.' . $mode);

    So I'm assuming, as it was said above, this is just not updated yet.

  • 🇮🇳India ravi kant Jaipur

    The Patch #3 is not applying.
    But worked according suggestion by @Rares Petru Samartean #5.
    Only i download the module and ran composer install.

  • 🇮🇳India ravi kant Jaipur

    The library is not installing as i have commented above.
    I downloaded from below URL , copied in libraries folder and renamed folder name as ace-builds.
    https://github.com/ajaxorg/ace-builds

  • Status changed to Closed: won't fix 5 months ago
  • 🇯🇴Jordan Rajab Natshah Jordan
    Installation
    Install with Composer (recommended) or manually, by following these steps.

    Install with Composer
    Define npm-asset repository in the composer.json file, to allow downloading the ACE Editor JavaScript library to the correct folder:

    composer config repositories.assets composer https://asset-packagist.org
    composer config --json extra.installer-types '["npm-asset", "bower-asset"]'
    composer config --json extra.installer-paths.web\/libraries\/ace '["npm-asset/ace-builds"]'
    composer config --unset extra.installer-paths.web\/libraries\/\{\$name\}
    composer config --json extra.installer-paths.web\/libraries\/\{\$name\} '["type:drupal-library", "type:bower-asset", "type:npm-asset"]'
    

    Download the ACE Editor module and install it:

    composer require drupal/ace_editor:~2.0
    drush en ace_editor
    
Production build 0.71.5 2024