Coding⏱️ 3 min read📅 2026-06-04

How to Fix: "Type 'EventEmitter' is not generic" ERROR in angular

Angular CLI update resolves non-generic EventEmitter error

Quick Answer: The issue is likely due to a recent change in Angular. Try updating your Angular CLI to the latest version.

The 'Type 'EventEmitter' is not generic' error in Angular occurs when the @Output() decorator is used with an EventEmitter that has type arguments. This issue affects developers who are new to Angular and may not be familiar with the nuances of TypeScript generics.

This error can be frustrating for developers because it prevents the code from compiling, making it difficult to complete tasks. However, understanding the root cause of this error allows developers to fix it efficiently.

🔍 Why This Happens

  • The primary reason for this error is that the EventEmitter in Angular is a generic class, which means it can work with different types of data. When type arguments are added to the EventEmitter, it becomes a specific type, and if not used correctly, it can cause errors.
  • Another possible reason for this error could be due to incorrect usage of the @Output() decorator or missing imports.

🚀 How to Resolve This Issue

Resolving the Error by Removing Type Arguments

  1. Step 1: Open the component where the EventEmitter is used and remove any type arguments from the EventEmitter declaration.
  2. Step 2: Replace the code with the following: `@Output() ratingClicked: EventEmitter = new EventEmitter();`
  3. Step 3: This change removes the type argument, allowing the code to compile without errors.

Resolving the Error using Correct Type Arguments

  1. Step 1: Open the component where the EventEmitter is used and add correct type arguments to the EventEmitter declaration.
  2. Step 2: Replace the code with the following: `@Output() ratingClicked: EventEmitter = new EventEmitter();`
  3. Step 3: This change adds the correct type argument, allowing the code to compile without errors.

💡 Conclusion

To resolve the 'Type 'EventEmitter' is not generic' error in Angular, remove any type arguments from the EventEmitter declaration or add correct type arguments. By following these steps, developers can efficiently fix this issue and complete their tasks.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions