Mike Poole
Mike Poole

Reputation: 2055

Angular component is missing a template

I am upgrading an app from Angular 8 to Angular 9 and have the following error when I do a build:

ERROR in component is missing a template

There is no indication of which component is missing a template. Is there a way to find this out without going into each component individually?

I have been through all the components in the app and they all seem to have an templateUrl specified in the @Component decorator. Here is an example:

@Component({
  selector: 'app-activities',
  templateUrl: './activities.component.html',
  styleUrls: ['./activities.component.scss']
})

Upvotes: 2

Views: 4987

Answers (2)

user2866001
user2866001

Reputation: 69

You can probably just use a blank template, at least that's what worked for me.

template: ''

Upvotes: 2

Mike Poole
Mike Poole

Reputation: 2055

The obscure error message is a bug with the Angular 9 release candidate which they are investigating:

https://github.com/angular/angular/issues/34725

Upvotes: 1

Related Questions