NG8003: No directive found with export

From Get docs
< Errors ListAngular/docs/latest/errors/ng8003


NG8003: No directive found with export


Description

Angular can’t find a directive with Template:PLACEHOLDER export name. This is common with a missing import or a missing exportAs on a directive.

This is the compiler equivalent of a common runtime error NG0301: Export Not Found.

Debugging the error

Use the string name of the export not found to trace the templates or modules using this export.

Ensure that all dependencies are properly imported and declared in our Modules. For example, if the export not found is ngForm, we will need to import FormsModule and declare it in our list of imports in *.module.ts to resolve the missing export error.

import { FormsModule } from '@angular/forms';

@NgModule({
  ...
  imports: [
    FormsModule,
    …

If you recently added an import, you will need to restart your server to see these changes.


© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/errors/NG8003