shopwareArchive / shopware-platform-vagrant

DEPRECATED: A Vagrant setup ready for shopware platform development
22 stars 14 forks source link

I am getting a error because composer 2 doens't seem to be installed on the vagrant box. #30

Closed Darkbelg closed 3 years ago

Darkbelg commented 3 years ago

Hello i am trying to install shopware following the documentation: https://docs.shopware.com/en/shopware-platform-dev-en/system-guide/system-installation-guides/vagrant.

I get the following error:

TASK [shopware-dev : execute psh.phar install] *********************************
fatal: [default]: FAILED! => {"changed": true, "cmd": ["./psh.phar", "install"], "delta": "0:01:52.448106", "end": "2021-02-17 14:52:12.770198", "msg": "non-zero return code", "rc": 1, "start": "2021-02-17 14:50:20.322092", "stderr": "", "stderr_lines": [], "stdout": "\n###################\n\nSHOPWARE Developer Version\n\n       _\n      | |\n   ___| |__   ___  _ ____      ____ _ _ __ ___\n  / __| '_ \\ / _ \\| '_ \\ \\ /\\ / / _` | '__/ _ \\\n  \\__ \\ | | | (_) | |_) \\ V  V / (_| | | |  __/\n  |___/_| |_|\\___/| .__/ \\_/\\_/ \\__,_|_|  \\___|\n                  | |\n                  |_|\n\nUsing .psh.yaml.dist extended by .psh.yaml.override\n\n\nStarting Execution of 'install' ('/home/vagrant/shopware-dev/dev-ops/common/actions/install.sh')\n\n\n(1/42) Starting\n> php dev-ops/generate_ssl.php\n\t\n(2/42) Starting\n> if [ -d \"var/cache\" ]; then find var/cache -maxdepth 1 ! -name cs_fixer ! -name phpstan ! -name psalm ! -wholename var/cache -exec rm -rf {} \\;; fi\n\t\n(3/42) Starting\n> rm -rf vendor/shopware\n\t\n(4/42) Starting\n> rm -rf composer.lock\n\t\n(5/42) Starting\n> rm -rf dev-ops/analyze/vendor\n\t\n(6/42) Starting\n> composer update --no-interaction --optimize-autoloader --no-suggest --no-scripts\n\tLoading composer repositories with package information\n\tWarning from https://packagist.org: You are using an outdated version of Composer. Composer 2.0 is now available and you should upgrade. See https://getcomposer.org/2\n\tUpdating dependencies (including require-dev)\n\tYour requirements could not be resolved to an installable set of packages.\n\t\n\t  Problem 1\n\t    - The requested package composer-runtime-api could not be found in any version, there may be a typo in the package name.\n\t  Problem 2\n\t    - shopware/platform 9999999-dev requires composer-runtime-api ^2.0 -> no matching package found.\n\t    - shopware/platform 6.4.x-dev requires composer-runtime-api ^2.0 -> no matching package found.\n\t    - shopware/platform dev-trunk requires composer-runtime-api ^2.0 -> no matching package found.\n\t    - Installation request for shopware/platform 6.4.x@dev || dev-trunk -> satisfiable by shopware/platform[9999999-dev, 6.4.x-dev].\n\t\n\tPotential causes:\n\t - A typo in the package name\n\t - The package is not available in a stable-enough version according to your minimum-stability setting\n\t   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.\n\t - It's a private package and you forgot to add a custom repository to find it\n\t\n\tRead <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.\n\t\nExecution aborted, a subcommand failed!", "stdout_lines": ["", "###################", "", "SHOPWARE Developer Version", "", "       _", "      | |", "   ___| |__   ___  _ ____      ____ _ _ __ ___", "  / __| '_ \\ / _ \\| '_ \\ \\ /\\ / / _` | '__/ _ \\", "  \\__ \\ | | | (_) | |_) \\ V  V / (_| | | |  __/", "  |___/_| |_|\\___/| .__/ \\_/\\_/ \\__,_|_|  \\___|", "                  | |", "                  |_|", "", "Using .psh.yaml.dist extended by .psh.yaml.override", "", "", "Starting Execution of 'install' ('/home/vagrant/shopware-dev/dev-ops/common/actions/install.sh')", "", "", "(1/42) Starting", "> php dev-ops/generate_ssl.php", "\t", "(2/42) Starting", "> if [ -d \"var/cache\" ]; then find var/cache -maxdepth 1 ! -name cs_fixer ! -name phpstan ! -name psalm ! -wholename var/cache -exec rm -rf {} \\;; fi", "\t", "(3/42) Starting", "> rm -rf vendor/shopware", "\t", "(4/42) Starting", "> rm -rf composer.lock", "\t", "(5/42) Starting", "> rm -rf dev-ops/analyze/vendor", "\t", "(6/42) Starting", "> composer update --no-interaction --optimize-autoloader --no-suggest --no-scripts", "\tLoading composer repositories with package information", "\tWarning from https://packagist.org: You are using an outdated version of Composer. Composer 2.0 is now available and you should upgrade. See https://getcomposer.org/2", "\tUpdating dependencies (including require-dev)", "\tYour requirements could not be resolved to an installable set of packages.", "\t", "\t  Problem 1", "\t    - The requested package composer-runtime-api could not be found in any version, there may be a typo in the package name.", "\t  Problem 2", "\t    - shopware/platform 9999999-dev requires composer-runtime-api ^2.0 -> no matching package found.", "\t    - shopware/platform 6.4.x-dev requires composer-runtime-api ^2.0 -> no matching package found.", "\t    - shopware/platform dev-trunk requires composer-runtime-api ^2.0 -> no matching package found.", "\t    - Installation request for shopware/platform 6.4.x@dev || dev-trunk -> satisfiable by shopware/platform[9999999-dev, 6.4.x-dev].", "\t", "\tPotential causes:", "\t - A typo in the package name", "\t - The package is not available in a stable-enough version according to your minimum-stability setting", "\t   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.", "\t - It's a private package and you forgot to add a custom repository to find it", "\t", "\tRead <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.", "\t", "Execution aborted, a subcommand failed!"]}

PLAY RECAP *********************************************************************
default                    : ok=30   changed=26   unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

Doing vagrant provision afterwards does not fix the error.

I formatted the json:

"fatal":[
   "default"
]:"FAILED! =>"{
   "changed":true,
   "cmd":[
      "./psh.phar",
      "install"
   ],
   "delta":"0:01:52.448106",
   "end":"2021-02-17 14:52:12.770198",
   "msg":"non-zero return code",
   "rc":1,
   "start":"2021-02-17 14:50:20.322092",
   "stderr":"",
   "stderr_lines":[

   ],
   "stdout":"\n###################\n\nSHOPWARE Developer Version\n\n       _\n      | |\n   ___| |__   ___  _ ____      ____ _ _ __ ___\n  / __| '_ \\ / _ \\| '_ \\ \\ /\\ / / _` | '__/ _ \\\n  \\__ \\ | | | (_) | |_) \\ V  V / (_| | | |  __/\n  |___/_| |_|\\___/| .__/ \\_/\\_/ \\__,_|_|  \\___|\n                  | |\n                  |_|\n\nUsing .psh.yaml.dist extended by .psh.yaml.override\n\n\nStarting Execution of 'install' ('/home/vagrant/shopware-dev/dev-ops/common/actions/install.sh')\n\n\n(1/42) Starting\n> php dev-ops/generate_ssl.php\n\t\n(2/42) Starting\n> if [ -d \"var/cache\" ]; then find var/cache -maxdepth 1 ! -name cs_fixer ! -name phpstan ! -name psalm ! -wholename var/cache -exec rm -rf {} \\;; fi\n\t\n(3/42) Starting\n> rm -rf vendor/shopware\n\t\n(4/42) Starting\n> rm -rf composer.lock\n\t\n(5/42) Starting\n> rm -rf dev-ops/analyze/vendor\n\t\n(6/42) Starting\n> composer update --no-interaction --optimize-autoloader --no-suggest --no-scripts\n\tLoading composer repositories with package information\n\tWarning from https://packagist.org: You are using an outdated version of Composer. Composer 2.0 is now available and you should upgrade. See https://getcomposer.org/2\n\tUpdating dependencies (including require-dev)\n\tYour requirements could not be resolved to an installable set of packages.\n\t\n\t  Problem 1\n\t    - The requested package composer-runtime-api could not be found in any version, there may be a typo in the package name.\n\t  Problem 2\n\t    - shopware/platform 9999999-dev requires composer-runtime-api ^2.0 -> no matching package found.\n\t    - shopware/platform 6.4.x-dev requires composer-runtime-api ^2.0 -> no matching package found.\n\t    - shopware/platform dev-trunk requires composer-runtime-api ^2.0 -> no matching package found.\n\t    - Installation request for shopware/platform 6.4.x@dev || dev-trunk -> satisfiable by shopware/platform[9999999-dev, 6.4.x-dev].\n\t\n\tPotential causes:\n\t - A typo in the package name\n\t - The package is not available in a stable-enough version according to your minimum-stability setting\n\t   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.\n\t - It's a private package and you forgot to add a custom repository to find it\n\t\n\tRead <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.\n\t\nExecution aborted, a subcommand failed!",
   "stdout_lines":[
      "",
      "###################",
      "",
      "SHOPWARE Developer Version",
      "",
      "       _",
      "      | |",
      "   ___| |__   ___  _ ____      ____ _ _ __ ___",
      "  / __| '_ \\ / _ \\| '_ \\ \\ /\\ / / _` | '__/ _ \\",
      "  \\__ \\ | | | (_) | |_) \\ V  V / (_| | | |  __/",
      "  |___/_| |_|\\___/| .__/ \\_/\\_/ \\__,_|_|  \\___|",
      "                  | |",
      "                  |_|",
      "",
      "Using .psh.yaml.dist extended by .psh.yaml.override",
      "",
      "",
      "Starting Execution of 'install' ('/home/vagrant/shopware-dev/dev-ops/common/actions/install.sh')",
      "",
      "",
      "(1/42) Starting",
      "> php dev-ops/generate_ssl.php",
      "\t",
      "(2/42) Starting",
      "> if [ -d \"var/cache\" ]; then find var/cache -maxdepth 1 ! -name cs_fixer ! -name phpstan ! -name psalm ! -wholename var/cache -exec rm -rf {} \\;; fi",
      "\t",
      "(3/42) Starting",
      "> rm -rf vendor/shopware",
      "\t",
      "(4/42) Starting",
      "> rm -rf composer.lock",
      "\t",
      "(5/42) Starting",
      "> rm -rf dev-ops/analyze/vendor",
      "\t",
      "(6/42) Starting",
      "> composer update --no-interaction --optimize-autoloader --no-suggest --no-scripts",
      "\tLoading composer repositories with package information",
      "\tWarning from https://packagist.org: You are using an outdated version of Composer. Composer 2.0 is now available and you should upgrade. See https://getcomposer.org/2",
      "\tUpdating dependencies (including require-dev)",
      "\tYour requirements could not be resolved to an installable set of packages.",
      "\t",
      "\t  Problem 1",
      "\t    - The requested package composer-runtime-api could not be found in any version, there may be a typo in the package name.",
      "\t  Problem 2",
      "\t    - shopware/platform 9999999-dev requires composer-runtime-api ^2.0 -> no matching package found.",
      "\t    - shopware/platform 6.4.x-dev requires composer-runtime-api ^2.0 -> no matching package found.",
      "\t    - shopware/platform dev-trunk requires composer-runtime-api ^2.0 -> no matching package found.",
      "\t    - Installation request for shopware/platform 6.4.x@dev || dev-trunk -> satisfiable by shopware/platform[9999999-dev, 6.4.x-dev].",
      "\t",
      "\tPotential causes:",
      "\t - A typo in the package name",
      "\t - The package is not available in a stable-enough version according to your minimum-stability setting",
      "\t   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.",
      "\t - It's a private package and you forgot to add a custom repository to find it",
      "\t",
      "\tRead <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.",
      "\t",
      "Execution aborted, a subcommand failed!"
   ]
}

It seems like composer 2 is expected but one is only installed.

Manually installing composer 2 on the box fixes my issue.

theCVDH commented 3 years ago

I have the Same Issue

michalpaszkowiak commented 3 years ago

Me either

theCVDH commented 3 years ago

I downgreate to 6.2 that work fine to me until it will fixed

michalpaszkowiak commented 3 years ago

I downgreate to 6.2 that work fine to me until it will fixed

I followed your advice and it works fine for me as well. For anyone encountering the same problem: go into shopware-platform-vagrant > ansible > vars and open the all.yaml file. Change the value of _"shopwareversion" from "trunk" to e.g. "v6.2.2". Then you can proceed with the command "vagrant up" as usual.

Darkbelg commented 3 years ago

Opened an issue on the official issue tracker: https://issues.shopware.com/issues/NEXT-13899

moorl commented 3 years ago

Issue was closed, problem not solved yet.

Also the shopware update from older version does not work:

Error Please execute "composer install" from the command line to install the required dependencies for Shopware 6

Did composer install and update isn't working

Darkbelg commented 3 years ago

From shopware:

We will no longer support the vagrant example. Please use docker instead.

shyim commented 3 years ago

Should work on master again