TripalCultivate / TripalCultivate-Theme

Provides a base theme for our collection of Tripal Cultivate sites.
0 stars 0 forks source link

Cannot install via composer #16

Closed laceysanderson closed 3 months ago

laceysanderson commented 5 months ago

The current setup does not allow us to install via composer like I hoped it would 🙈

docker run --publish=80:80 --name=t4 -tid tripalproject/tripaldocker:latest
docker exec -it t4 service postgresql restart
docker exec -it t4 bash
root@cc02cf03ce2e:/var/www/drupal/web# composer require tripalcultivate/trpcultivatetheme

Installation failed, deleting ./composer.json.

In RequireCommand.php line 226:

  No composer.json present in the current directory (./composer.json), this may be the cause of the following exception.  

In PackageDiscoveryTrait.php line 332:

  Could not find a version of package tripalcultivate/trpcultivatetheme matching your minimum-stability (stable). Require it with an explicit version constraint allowing its desired stability.  

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-m|--minimal-changes] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]

root@cc02cf03ce2e:/var/www/drupal/web# cd ../
root@cc02cf03ce2e:/var/www/drupal# composer require tripalcultivate/trpcultivatetheme
Composer could not detect the root package (drupal/recommended-project) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
./composer.json has been updated
Composer could not detect the root package (drupal/recommended-project) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Running composer update tripalcultivate/trpcultivatetheme
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 tripalcultivate/trpcultivatetheme * -> satisfiable by tripalcultivate/trpcultivatetheme[4.x-dev].
    - tripalcultivate/trpcultivatetheme 4.x-dev requires tripalcultivate/trpcultivatetheme-theme * -> 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

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require tripalcultivate/trpcultivatetheme:*" to figure out if any version is installable, or "composer require tripalcultivate/trpcultivatetheme:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
laceysanderson commented 5 months ago

Resources:

Maybe we remove the composer.jsons from the sub-directories and let Drupal handle the dependency not composer... but then how do we tell composer to put 1/2 it in the themes directory and the other half in the modules directory?