pantheon-systems / terminus-build-tools-plugin

Manage multidev environments for a Pantheon site using a GitHub PR workflow.
83 stars 68 forks source link

New install of build tools- "Could not load Terminus composer data" #345

Open ptmkenny opened 4 years ago

ptmkenny commented 4 years ago

Using Ubuntu 20.04 on WSL.

terminus --version
Terminus 2.3.0
composer --version
Composer version 1.10.6 2020-05-06 10:28:10

PHP set up like this:

sudo add-apt-repository ppa:ondrej/php
sudo apt -y install php7.4 php7.4-curl php7.4-xml php7.4-mbstring php7.4-gd php7.4-zip

Getting this error:

terminus build:project:create --git=github --team='My Team' d8 my_project

In ComposerDependencyValidator.php line 50:

  Could not load Terminus composer data.

build:project:create [--org [ORG]] [--team [TEAM]] [--pantheon-site [PANTHEON-SITE]] [--label [LABEL]] [--email [EMAIL]] [--test-site-name [TEST-SITE-NAME]] [--admin-password [ADMIN-PASSWORD]] [--admin-email [ADMIN-EMAIL]] [--admin-username [ADMIN-USERNAME]] [--stability [STABILITY]] [--env ENV] [--preserve-local-repository] [--keep] [--use-ssh] [--ci [CI]] [--git [GIT]] [--visibility [VISIBILITY]] [--region [REGION]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-y|--yes] [--] <command> <source> [<target>]

I tried again with different versions and got the same error.

Exact steps as follows:

From Windows 10 Pro May 2020 Update, install Ubuntu 18.04 LTS from Store.

Then run the following commands:

Set up PHP 7.3:

sudo add-apt-repository ppa:ondrej/php
sudo apt -y install php7.3 php7.3-curl php7.3-xml php7.3-mbstring php7.3-gd php7.3-zip

Set up Composer:


mkdir ~/composer; cd ~/composer
php -r “copy(‘https://getcomposer.org/installer’, ‘composer-setup.php’);”
php -r “if (hash_file(‘sha384′, ‘composer-setup.php’) === ‘e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a’) { echo ‘Installer verified’; } else { echo ‘Installer corrupt’; unlink(‘composer-setup.php’); } echo PHP_EOL;”
php composer-setup.php
php -r “unlink(‘composer-setup.php’);”
sudo ln -s ~/composer/composer.phar /usr/local/bin/composer

Set up terminus:

mkdir ~/terminus && cd ~/terminus
curl -L https://github.com/pantheon-systems/terminus/releases/download/$(curl —silent “https://api.github.com/repos/pantheon-systems/terminus/releases/latest” | perl -nle’print $& while m{“tag_name”: “\K.*?(?=”)}g’)/terminus.phar —output terminus
chmod +x terminus
sudo ln -s ~/terminus/terminus /usr/local/bin/terminus

Set up build tools:


mkdir -p ~/.terminus/plugins
composer create-project —no-dev -d ~/.terminus/plugins pantheon-systems/terminus-build-tools-plugin:^2.0

Then log in with terminus machine token and run:


terminus build:project:create —git=github —team=‘My Team’ d8 my_project

Error: In ComposerDependencyValidator.php line 50:
Could not load Terminus composer data.
ptmkenny commented 4 years ago

Installing Terminus using the “Installer PHAR“ method seems to work, but the standalone method does not work. That should really be documented because the standalone method comes first in the docs, suggesting that is the recommended method.

https://pantheon.io/docs/terminus/install

jane-gravityworks commented 4 years ago

Having the same issue.

sagannotcarl commented 4 years ago

I'm having the same problem using Lando.