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 it

Read 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

Command icon 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

Anybody created an issue. See original summary.

  • Anybody committed 9ec55fd on 4.x
    Issue #3269506 by Anybody: Fix composer require failure due to npm-...
anybody’s picture

Status: Active » Postponed
anybody’s picture

grevil’s picture

Status: Postponed » Active
grevil’s picture

Title: [PP-1] Fix composer require failure due to npm-asset » Fix composer require failure due to npm-asset
grevil’s picture

Issue summary: View changes
grevil’s picture

Issue summary: View changes

grevil’s picture

Status: Active » Needs review

Ok, 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. :)

anybody’s picture

Assigned: Unassigned » grevil
Status: Needs review » Needs work

@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?

anybody’s picture

grevil’s picture

@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

grevil’s picture

Status: Needs work » Needs review
anybody’s picture

Status: Needs review » Fixed

Well done once again! :)

  • Anybody committed 90c6032 on 4.x authored by Grevil
    Issue #3269506 by Grevil, Anybody: Fix composer require failure due to...
anybody’s picture

Now in 4.2.2! :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.