Problem/Motivation


composer require 'drupal/charts_echarts:^1.0'
./composer.json has been updated
Running composer update drupal/charts_echarts

Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/charts_echarts ^1.0 -> satisfiable by drupal/charts_echarts[1.0.0].
    - drupal/charts_echarts 1.0.0 requires apache/echarts 5.3.2 -> 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 <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it


Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

maxilein created an issue. See original summary.

adam.bauer’s picture

I am having the same issue, Drupal 10.2.7, php 8.1.29, Apache 2.4.59 server, MySQL 8.0.37
I have loaded the echarts with:
composer require --prefer-dist npm-asset/echarts:^5.5

and verified that echarts exists in the libraries folder

I am not a composer expert but the echarts composer is looking for "apache/echarts", but my Drupal composer call it "npm-asset/echarts"

composer require 'drupal/charts_echarts:^1.0' --with-all-dependencies
returns this error:
- drupal/charts_echarts[1.0.0-alpha4, ..., 1.0.x-dev] require apache/echarts 5.3.2 -> could not be found in any version, there may be a typo in the package name.

aaron.ferris made their first commit to this issue’s fork.

aaron.ferris’s picture

Also noticed this, played with the idea of swapping out to GitHub, but as above we could use npm-assetinstead?

Im not really sure about this though, as the actual dist looks like its 5.5.0 not 5.3.2,

If we wanted to lock to 5.3.2 wouldn't this be: https://cdn.jsdelivr.net/npm/echarts@5.3.2/dist/echarts.min.js?

r_h-l’s picture

There's a couple of things going on. I am not sure why their composer.json doesn't resolve the dependency issue. It's also odd that the readme has you go through a bunch of steps to install the NPM, when the statement in their on composer should install it. That should really be updated, as the method described creates a ton of bloat.

I any case, I copied and pasted the package data for apache/echarts into my main composer.json and it let things install fine, and does pull down the latest version at time of install.

emmavega’s picture

I have the same problem, I can't finish installing it on a drupal 10.3.6, the error text it gives me is the following:

Problem 1
- drupal/charts_echarts[1.0.0-alpha1, ..., 1.0.0-alpha3] require drupal/core ^8 || ^9 -> found drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev] but the package is fixed to 10.3.6 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/charts_echarts[1.0.0-alpha4, ..., 1.0.x-dev] require apache/echarts 5.3.2 -> could not be found in any version, there may be a typo in the package name.
- Root composer.json requires drupal/charts_echarts ^1.0 -> satisfiable by drupal/charts_echarts[1.0.0-alpha1, ..., 1.0.x-dev].

Has anyone found something new?

andileco made their first commit to this issue’s fork.

andileco’s picture

Hi All! Apologies for not seeing this earlier. I updated the merge request with some code that's worked for me on the new Apexcharts.js (drupal.org/project/charts_apexcharts) module. Please try it out and let me know if it works!

3eidoz’s picture

I have the same problem, I can't finish installing it on a Drupal 11.1.3, the error text it gives me is the following:

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires drupal/charts_echarts ^1.0 -> satisfiable by drupal/charts_echarts[1.0.0].
- drupal/charts_echarts 1.0.0 requires apache/echarts 5.3.2 -> 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.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
exit status 2
Composer [require drupal/charts_echarts:^1.0] failed, composer command failed: exit status 2. stderr=

emerham’s picture

Status: Active » Reviewed & tested by the community

I added this issue fork in my repositories above Drupal to ensure it will have higher priority and pinned it to the latest issue fork commit.

"repositories": [
        {
            "type": "package",
            "package": {
                "name": "drupal/charts_echarts",
                "version": "1.0.x-dev",
                "type": "drupal-module",
                "source": {
                    "url": "git@git.drupal.org:issue/charts_echarts-3452404.git",
                    "type": "git",
                    "reference": "8df70036c2788edb4bcf52b7a8255088d990d7e6"
                }
            }
        },
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
        {
            "type": "composer",
            "url": "https://asset-packagist.org"
        },

I am able to use composer to require the module now and it installed cleanly

composer require drupal/charts_echarts:1.0.x-dev
./composer.json has been updated
Running composer update drupal/charts_echarts
Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
- Locking drupal/charts_echarts (1.0.x-dev 8df7003)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Syncing drupal/charts_echarts (1.0.x-dev 8df7003) into cache
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
- Installing drupal/charts_echarts (1.0.x-dev 8df7003): Cloning 8df70036c2 from cache
Generating autoload files

I can confirm that the update to composer.json fixed the abilty to install the module using the Asset Packagist version of Echarts.

andileco’s picture

Status: Reviewed & tested by the community » Fixed

Thank you! Going to issue a new release.

Status: Fixed » Closed (fixed)

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