POSTPONED ON #2873160: Implement core management of 3rd-party FE libraries
Hopefully no one forgets the npm-asset until this can be solved cleanly.
Until this is not implemented in core, we will use "hook_requirements" to let the user know if there are "npm-asset" composer libraries missing.
Problem/Motivation
This part of the composer.json is problematic:
https://git.drupalcode.org/project/drowl_media/-/blob/3.x/composer.json:
"require": {
"npm-asset/drowl-admin-iconset": "^1.0"
}
as npm-asset is unknown to composer. This makes testing on drupal.org impossible:
https://www.drupal.org/pift-ci-job/2339058:
Updating dependencies
Your requirements could not be resolved to an installable set of packages.Problem 1
- drupal/drowl_media dev-3.x requires npm-asset/drowl-admin-iconset ^1.0 -> could not be found in any version, there may be a typo in the package name.
- drupal/drowl_media 3.x-dev is an alias of drupal/drowl_media dev-3.x and thus requires it to be installed too.
- Root composer.json requires drupal/drowl_media 3.x-dev#eaaf2633bc86491703155244c1d2fe549448a7ff -> satisfiable by drupal/drowl_media[3.x-dev (alias of dev-3.x)].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 itRead for further common problems.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Related:
https://www.drupal.org/docs/develop/using-composer/using-composer-to-ins...
https://github.com/drupal-composer/drupal-project/issues/278
Issue fork drowl_paragraphs-3269506
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
anybodyComment #4
anybodyComment #5
grevil commentedComment #6
grevil commentedComment #7
grevil commentedComment #8
grevil commentedComment #10
grevil commentedOk, I implemented the required hooks and changed the composer.jsons accordingly. Since "3269506-fix-composer-require" is not the main branch of the issue forks repository, it unfortunately will not show up in the comment section.
Furthermore, because this module is a pain to install locally, I couldn't test the changes yet. But considering, the code is a copy of #3269507: Fix composer require failure due to npm-asset (add hook_requirements check), which was manually tested, it should work just fine. :)
Comment #11
anybody@Grevil: You also made changes to the submodules composer files in the MR, but I can't see the related checkes in eachs .install file. Did you miss that or am I missing something?
Comment #12
anybodyRequirement failure is due to indirect dependency on #3269507: Fix composer require failure due to npm-asset (add hook_requirements check)
Comment #13
grevil commented@Anybody no you have not missed anything in the MR. :)
YOU have already implemented the hooks correctly in both of these submodules, see: here and here
Comment #14
grevil commentedComment #15
anybodyWell done once again! :)
Comment #17
anybodyNow in 4.2.2! :)