0

I'm having a hard time setting up my local Magento cloud environment. I'm following this guide:

https://devdocs.magento.com/cloud/docker/docker-development.html

The exact steps I'm taking are:

  1. Cloning the magento-cloud project: git clone https://github.com/magento/magento-cloud.git.
  2. Adding my enterprise credentials to the auth.json file using composer config.
  3. Running composer update.
  4. Running this command to create the docker-compose file with xdebug and mutagen file sync (on Linux): vendor/bin/ece-docker build:compose --mode="developer" --with-xdebug --set-docker-host --sync-engine="mutagen"
  5. Running docker-compose up -d and then docker-compose run --rm deploy cloud-deploy

After that, I got the error:

Installing data... Reading /<magento_root>/composer.json
Loading config file /<magento_root>/composer.json
Failed to initialize global composer: Composer could not find the config file: /<magento_root>/var/composer_home/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section.

So I created an empty composer.json file in /var/composer_home following the advice in this answer. That solved that issue, but now I'm getting this:

Loading config file /app/composer.json
Loading config file /app/auth.json
Reading /app/auth.json
Reading /app/var/composer_home/composer.json
Loading config file /app/var/composer_home/composer.json
Reading /app/vendor/composer/installed.json
Reading /app/composer.lock
Checking for "magento/composer-root-update-plugin: 1.1.2" for the Web Setup Wizard...
Cloud installation detected, not installing magento/composer-root-update-plugin for the Web Setup Wizard
Reading /app/composer.json
Loading config file /app/composer.json
Loading config file /app/auth.json
Reading /app/auth.json
Reading /app/var/composer_home/composer.json
Loading config file /app/var/composer_home/composer.json
Reading /app/vendor/composer/installed.json
Reading /app/composer.lock
Checking for "magento/composer-root-update-plugin: 1.1.2" for the Web Setup Wizard...
Cloud installation detected, not installing magento/composer-root-update-plugin for the Web Setup Wizard

I've tried running bin/magento-docker ece-deploy instead of `````docker-compose run --rm deploy cloud-deploy```, but that didn't help. I also deleted everything and started from scratch just in case I missed something but had the same result.

How can I get rid of it?

1
  • Removing the magento/composer-root-update-plugin dependency allowed me to complete the deployment, but probably that's not the right way to solve this.
    – javag87
    Dec 15, 2021 at 14:44

1 Answer 1

0

Here's a workaround - after creating the project from Magento Repo, create the composer.json file

cd var

mkdir composer_home

cd composer_home

vim composer.json

composer.json contents

{

}

Hope this works for you.

1
  • That's not the problem. The issue is after I do that.
    – javag87
    Dec 20, 2021 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.