When creating a custom Drupal theme, you can encounter the following error message:

Drupal\Core\Extension\InfoParserException: Missing required key ("base theme") in themes/custom/mytheme/mytheme.info.yml, see https://www.drupal.org/node/3066038 in Drupal\Core\Extension\ThemeExtensionList->createExtensionInfo() (line 269 of core/lib/Drupal/Core/Extension/ThemeExtensionList.php).

Solution

The solution is to add a base theme key:

base theme: stable

"... we now require the base theme to be explicitly specified.", more on https://www.drupal.org/node/3066038

Full example: 

name: My theme
type: theme
base theme: stable
description: 'Custom theme MyTheme'
package: Other
core_version_requirement: ^9
regions:
  header: 'Header'
  pre_content: 'Pre-content'
  breadcrumb: Breadcrumb
  highlighted: Highlighted
  help: Help
  content: Content
  page_top: 'Page top'
  page_bottom: 'Page bottom'
  sidebar_first: 'First sidebar'