There are no entities matching. BaseFieldDefinition entity reference error for taxonomy My Code looks like this:
$fields['color'] = BaseFieldDefinition::create('entity_reference')
  -&gt;setLabel(t('Color'))
  -&gt;setDescription(t('The color of the fruit.'))
  -&gt;setSetting('target_type', 'taxonomy_term')
  -&gt;setSetting('handler', 'default:taxonomy_term')
  -&gt;setSetting('handler_settings', ['target_bundles' =&gt; ['Color' =&gt; 'Color']])
  -&gt;setDisplayOptions('view', [
    'label' =&gt; 'above',
    'type' =&gt; 'author',
    'weight' =&gt; -3,
  ])
  -&gt;setDisplayOptions('form', [
    'type' =&gt; 'entity_reference_autocomplete',
    'settings' =&gt; [
      'match_operator' =&gt; 'CONTAINS',
      'size' =&gt; 60,
      'autocomplete_type' =&gt; 'tags',
      'placeholder' =&gt; '',
    ],
    'weight' =&gt; -3,
  ])
  -&gt;setDisplayConfigurable('form', TRUE)
  -&gt;setDisplayConfigurable('view', TRUE);

I have a vocabulary with the name : 'Color' 
I have 3 terms in it : 'Red', 'Yellow', 'Green'
The error I'm getting is this :

I'm trying to figure out what went wrong.
Change the Color to color in ['target_bundles' =&gt; ['Color' =&gt; 'Color']]) if you create a vocabulary caller Color the machine name will be color Not Color So try with:

$fields['color'] = BaseFieldDefinition::create('entity_reference')
      -&gt;setLabel(t('Color'))
      -&gt;setDescription(t('The color of the fruit.'))
      -&gt;setSetting('target_type', 'taxonomy_term')
      -&gt;setSetting('handler', 'default:taxonomy_term')
      // Target is color not Color.
      -&gt;setSetting('handler_settings', ['target_bundles' =&gt; ['color' =&gt; 'Color']])
      -&gt;setDisplayOptions('view', [
        'label'  =&gt; 'above',
        'type'   =&gt; 'author',
        'weight' =&gt; -3,
      ])
      -&gt;setDisplayOptions('form', [
        'type'     =&gt; 'entity_reference_autocomplete',
        'settings' =&gt; [
          'match_operator'    =&gt; 'CONTAINS',
          'size'              =&gt; 60,
          'autocomplete_type' =&gt; 'tags',
          'placeholder'       =&gt; '',
        ],
        'weight'   =&gt; -3,
      ])
      -&gt;setDisplayConfigurable('form', TRUE)
      -&gt;setDisplayConfigurable('view', TRUE);