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:
- Cloning the magento-cloud project:
git clone https://github.com/magento/magento-cloud.git. - Adding my enterprise credentials to the
auth.jsonfile usingcomposer config. - Running
composer update. - 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" - Running
docker-compose up -dand thendocker-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?
-
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– javag872021年12月15日 14:44:10 +00:00Commented Dec 15, 2021 at 14:44
1 Answer 1
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.
-
That's not the problem. The issue is after I do that.javag87– javag872021年12月20日 12:47:51 +00:00Commented Dec 20, 2021 at 12:47
Explore related questions
See similar questions with these tags.