Magento 2.2.9
This error is driving me nuts:
More than one node matching the query: /config/type[@name='Magento\Framework\Console\CommandList']/arguments/argument[@name='commands']
I get this on my staging system but not on my local dev system. This occurs whenever I try to use any bin/magento command. Even a simple "bin/magento" comes up with this error.
I tried to track down to what causes this. I have a git post-receive hook on my dev system which rsyncs via ssh to the staging server. Odd thing is whenever I trigger this hook I can use bin/magento commands until I do a setup:upgrade. That one immediately fails with the mentioned error and after that I cannot use bin/magento anymore.
On the stagin system i deploy with a script:
#!/bin/bash
cd /web/;
MAG=bin/magento
if [ ! -f $MAG ]; then
echo "Magento instance not found!";
exit;
fi
php $MAG deploy:mode:show;
php $MAG maintenance:enable;
rm -rf pub/static/frontend/
rm -rf pub/static/adminhtml/
rm -rf var/view_preprocessed/*
rm -rf generated/code/*
rm -rf generated/metadata/*
php $MAG cache:flush 2>&1;
php $MAG setup:upgrade 2>&1;
php $MAG setup:di:compile 2>&1;
php $MAG setup:static-content:deploy en_US de_DE da_DK --exclude-theme Magento/luma --exclude-theme Magento/blank -f;
php $MAG cache:clean 2>&1;
php $MAG index:reindex 2>&1;
php $MAG maintenance:disable;
Before you ask: this setup and deployment has been working for me just fine for almost 2 years now on multiple systems.
Now I am lost and have no idea how to even debug this issue.
Any help or hint appreciated.
EDIT: By ommitting setup:upgrade the above deplyment script runs fine. The issue must happen during upgrade process.
1 Answer 1
Turns out my remote repository was somehow broken. Some of my custom modules did not contain any files. I had to remove and readd it locally before the remote repository finally noticed somthing was missing.
So a git issue after all.