2

I have an angular 11 workspace with several projects (libraries). Recently I added a new component to a library, and the compilation was all OK. After exposing the new component in my public-api.ts file, I am getting this one-line and non-sense error when compiling my library (with ng build my-lib command):

ERROR: Cannot read property 'then' of undefined

Has anybody encountered this issue? Please help!

public-api.ts latest change:

export * from './lib/ray-autocomplete/ray-autocomplete.module';
export * from './lib/ray-autocomplete/ray-autocomplete.component';

1 Answer 1

5

This was my fault when copying the new component from another component; I forgot to rename the files at @Component declaration:

@Component({
  selector: 'ray-autocomplete',
  templateUrl: './ray-autocomplete.component.html', 
  styleUrls: ['./ray-autocomplete.component.css'], 

But the error was very misleading.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.