diff --git a/core/modules/comment/src/Entity/CommentType.php b/core/modules/comment/src/Entity/CommentType.php
index b31dc63..5289c42 100644
--- a/core/modules/comment/src/Entity/CommentType.php
+++ b/core/modules/comment/src/Entity/CommentType.php
@@ -93,4 +93,13 @@ public function getTargetEntityTypeId() {
     return $this->target_entity_type_id;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function calculateDependencies() {
+    parent::calculateDependencies();
+    $target_entity_type = \Drupal::entityTypeManager()->getDefinition($this->target_entity_type_id);
+    $this->addDependency('module', $target_entity_type->getProvider());
+    return $this;
+  }
 }
diff --git a/core/modules/comment/src/Tests/CommentTypeTest.php b/core/modules/comment/src/Tests/CommentTypeTest.php
index fb5028f..1166931 100644
--- a/core/modules/comment/src/Tests/CommentTypeTest.php
+++ b/core/modules/comment/src/Tests/CommentTypeTest.php
@@ -187,4 +187,15 @@ public function testCommentTypeDeletion() {
     $this->assertRaw(t('The comment type %label has been deleted.', array('%label' => $type->label())));
   }
 
+  /**
+   * Tests that the module providing the target entity is listed as a dependency
+   */
+  public function testCalculateDependencies() {
+    // Create a comment type programmatically.
+    $type = $this->createCommentType('dep_test');
+    $target_entity_type = \Drupal::entityTypeManager()->getDefinition($type->getTargetEntityTypeId());
+    $dependencies = $type->calculateDependencies()->getDependencies();
+    $this->assertTrue(in_array($target_entity_type->getProvider(), $dependencies['module']), 'Module dependency was found.');
+  }
+
 }
diff --git a/core/modules/forum/config/install/comment.type.comment_forum.yml b/core/modules/forum/config/install/comment.type.comment_forum.yml
index 44a2d65..1032b1e 100644
--- a/core/modules/forum/config/install/comment.type.comment_forum.yml
+++ b/core/modules/forum/config/install/comment.type.comment_forum.yml
@@ -4,6 +4,7 @@ dependencies:
   enforced:
     module:
       - forum
+      - node
 id: comment_forum
 label: Comment_forum
 target_entity_type_id: node
diff --git a/core/profiles/standard/config/install/comment.type.comment.yml b/core/profiles/standard/config/install/comment.type.comment.yml
index ddcbbc9..8b2a102 100644
--- a/core/profiles/standard/config/install/comment.type.comment.yml
+++ b/core/profiles/standard/config/install/comment.type.comment.yml
@@ -1,6 +1,9 @@
 langcode: en
 status: true
-dependencies: {  }
+dependencies:
+  enforced:
+    module:
+      - node
 id: comment
 label: 'Default comments'
 target_entity_type_id: node
