I'm getting the same error but it refers to a different line of EntityViewsData.php:-
TypeError: Drupal\views\EntityViewsData::mapFieldDefinition(): Argument #3 ($field_definition) must be of type Drupal\Core\Field\FieldDefinitionInterface, null given, called in /var/www/hpets/drupal/web/core/modules/views/src/EntityViewsData.php on line 333 in Drupal\views\EntityViewsData->mapFieldDefinition() (line 435 of core/modules/views/src/EntityViewsData.php).
Likewise, the site was upgraded from 7.x to 9.x and then 10.1.6
The only error I found on the site before it went away was this warning on Reports > Field List
Warning: Undefined array key "image" in Drupal\field_ui\FieldStorageConfigListBuilder->buildRow() (line 133 of core/modules/field_ui/src/FieldStorageConfigListBuilder.php).
Warning: Trying to access array offset on value of type null in Drupal\field_ui\FieldStorageConfigListBuilder->buildRow() (line 133 of core/modules/field_ui/src/FieldStorageConfigListBuilder.php).
Warning: Undefined array key "image" in Drupal\field_ui\FieldStorageConfigListBuilder->buildRow() (line 133 of core/modules/field_ui/src/FieldStorageConfigListBuilder.php).
Warning: Trying to access array offset on value of type null in Drupal\field_ui\FieldStorageConfigListBuilder->buildRow() (line 133 of core/modules/field_ui/src/FieldStorageConfigListBuilder.php).
I hit the link to check manually for an update and it turned to custard. I have another version of this site running 10.1.6 and apart from the warnings, it seems fine.
composer require 'drush/drush:^12' --no-update
is problematic because running composer update, results in a message that Drush 12 requires composer runtime api 2.2 and the upgrade fails