theming – Site errors out when trying to create a subtheme based off classy in D9


I’m creating a custom theme in Drupal 9 and am trying to use classy as my subtheme but get the following error:

The website encountered an unexpected error. Please try again later.

DrupalCoreThemeMissingThemeDependencyException: Base theme classy has not been installed. in DrupalCoreThemeThemeInitialization->getActiveThemeByName() (line 122 of corelibDrupalCoreThemeThemeInitialization.php).

DrupalCoreThemeThemeInitialization->initTheme('custom_theme') (Line: 406)
DrupalCoreThemeThemeManager->initTheme(Object) (Line: 96)
DrupalCoreThemeThemeManager->getActiveTheme() (Line: 214)
DrupalCoreThemeRegistry->init(NULL) (Line: 258)
DrupalCoreThemeRegistry->getRuntime() (Line: 194)
DrupalCoreEntityEntityViewBuilder->getBuildDefaults(Object, 'full') (Line: 61)
DrupalnodeNodeViewBuilder->getBuildDefaults(Object, 'full') (Line: 157)
DrupalCoreEntityEntityViewBuilder->viewMultiple(Array, 'full', NULL) (Line: 123)
DrupalCoreEntityEntityViewBuilder->view(Object, 'full') (Line: 98)
DrupalCoreEntityControllerEntityViewController->view(Object, 'full', NULL) (Line: 66)
DrupalnodeControllerNodeViewController->view(Object, 'full', NULL)
call_user_func_array(Array, Array) (Line: 123)
DrupalCoreEventSubscriberEarlyRenderingControllerWrapperSubscriber->DrupalCoreEventSubscriber{closure}() (Line: 573)
DrupalCoreRenderRenderer->executeInRenderContext(Object, Object) (Line: 124)
DrupalCoreEventSubscriberEarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
DrupalCoreEventSubscriberEarlyRenderingControllerWrapperSubscriber->DrupalCoreEventSubscriber{closure}() (Line: 158)
SymfonyComponentHttpKernelHttpKernel->handleRaw(Object, 1) (Line: 80)
SymfonyComponentHttpKernelHttpKernel->handle(Object, 1, 1) (Line: 57)
DrupalCoreStackMiddlewareSession->handle(Object, 1, 1) (Line: 47)
DrupalCoreStackMiddlewareKernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupalpage_cacheStackMiddlewarePageCache->pass(Object, 1, 1) (Line: 85)
Drupalpage_cacheStackMiddlewarePageCache->handle(Object, 1, 1) (Line: 47)
DrupalCoreStackMiddlewareReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
DrupalCoreStackMiddlewareNegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
StackStackedHttpKernel->handle(Object, 1, 1) (Line: 705)
DrupalCoreDrupalKernel->handle(Object) (Line: 19)

Below is my theme.info.yml info:

name: Custom Theme
type: theme
description: "This is a custom theme for the company"
version: "1.0.0"
core: 8.x
package: "Custom"
core_version_requirement: ^8 || ^9
base theme: classy

# libraries:
#   - custom_theme/bootstrap_cdn
#   - custom_theme/global-styling

regions:
  search: Hidden Search Bar
  branding_navigation: Branding & Main Navigation
  header: Header
  primary_menu: Primary menu
  secondary_menu: Secondary menu
  content: Content
  footer: Footer

Why is it saying that ‘Base theme classy’ isn’t installed? I’ve never run into this issue before. Does it have something to do with Drupal 9? (This is my first time starting from scratch in D9)

I see that classy is in the core files so not sure why I’m getting this error?

Any help/suggestions?