OCC error after upgrade from 17 to 18

I’m trying to upgrade an older nextcloud install to the latest but have run into problems with occ producing an error after the first upgrade. Here’s the specifics:

nextcloud-17.0.10 upgraded to nextcloud-18.0.14
Debian Buster
PHP 7.3.29-1~deb10u1
Apache 2.4.38-3+deb10u5

It produces the following error regardless of the occ command. I’m running as www-data and in this case running without options to get the help screen :

$ php occ
An unhandled exception has been thrown:
ArgumentCountError: Too few arguments to function OCA\Deck\Command\UserExport::__construct(), 0 passed in /var/www/nextcloud-18/lib/private/Console/Application.php on line 223 and exactly 7 expected in /var/www/nextcloud-18/apps/deck/lib/Command/UserExport.php:47
Stack trace:
#0 /var/www/nextcloud-18/lib/private/Console/Application.php(223): OCA\Deck\Command\UserExport->__construct()
#1 /var/www/nextcloud-18/lib/private/Console/Application.php(135): OC\Console\Application->loadCommandsFromInfoXml(Array)
#2 /var/www/nextcloud-18/console.php(98): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/nextcloud-18/occ(11): require_once('/var/www/nextcl...')
#4 {main}

I’m guessing this is a bug in the deck app, but not sure how to troubleshoot or correct.
EDIT: Forgot to mention that as far as I can tell, everything works fine from the web interface and via the nextcloud clients. Seems to only effect occ running. The cronjob seems to be working fine also.

Looks a bit like it. You can disable and enable it to make sure the latest version is installed.

Since NC 18 isn’t supported any more, I’d try to upgrade through to a supported version (NC 20) because even if you find bugs they won’t fix it for old versions.

Thanks for the suggestion. I uninstalled Deck which allowed occ to run. I removed and reinstalled it but same issue. I uninstalled it and upgraded to nextcloud19 then enabled it again and everything is fine. Don’t think the users were using it, so doubt there was any data to worry about in this case.

Now onto nextcloud20…