2

I am creating a library within my current project. I am slowly moving components and services to that library in order to use the logic again in future apps. The problem I'm facing is the following :

src/app/core/interfaces/index.ts:1:15 - error TS6059: File 'C:/Users/Benjamin/Documents/Bizzpeek/coolabify/client/src/app/core/interfaces/AnyObject.ts' is not under 'rootDir' 'C:\Users\Benjamin\Documents\Bizzpeek\coolabify\client\projects\cloud-republic\src'. 'rootDir' is expected to contain all source files.        

1 export * from './AnyObject';

I don't really understand what is happening with this error, nor why it happens.

gabhar
  • 187
  • 1
  • 4
  • 14
  • `tsconfig.json` contains a property called `rootDir` to tell typescript where all of your files live. If you import/reference any files outside of this rootDir, it gives you this error. Can you check your `tsconfig.json` to see where the `rootDir` is, and see if any of the files you are importing live outside of this directory. – plusheen Jan 27 '22 at 15:13
  • Check this comment with explanation: https://stackoverflow.com/a/76500288/9026103 – Igor Kurkov Jun 18 '23 at 11:28

0 Answers0