I got this error when upgrading to drupal 9:
Currently using Missing or invalid modules Array
This is a drush issue. Upgrade to the latest drush to fix this:
Change
"drush/drush": "^9.0.0",
to
"drush/drush": "^10.0.0",
Need more help upgrading? See: https://stefvanlooveren.me/blog/how-upgrade-drupal-8-9-composer