Angular Library - rootDir is expected to contain all source files

136 Views Asked by At

I'm working on angular library and creating each component as independent modules. I have created own ErrorStateMatcher & error config and placed it in different folder (./errors) so I can reuse them in other components. I'm getting following errors when I put these files in different folder and import in input.component.ts. Note: no errors when include these files in input folder.

✖ Compiling with Angular sources in Ivy partial compilation mode.
error TS6059: File '[path to app]/projects/mint/errors/error-option.ngtypecheck.ts' is not under 'rootDir' '[path to app]/projects/mint/input'. 'rootDir' is expected to contain all source files

enter image description here

input.component.ts

import { MintErrorMatcher } from '../errors/error-option';
import { _MintInputBase } from '../errors/error-state';

@Component({
    selector: 'mint-input',
    ...
    providers: [
        {
            provide: ErrorStateMatcher,
            useClass: MintErrorMatcher,
        },
    ]
})

export class MintInputComponent extends _MintInputBase { ... }

0

There are 0 best solutions below