'rootDir' is expected to contain all source files

后端 未结 3 868
野的像风
野的像风 2020-12-11 14:26

I have an Angular CLI workspace containing two library projects, foo and bar. When I build the second of the two libraries, foo, the b

3条回答
  •  时光说笑
    2020-12-11 15:06

    I had the same issue, but the solution of @Agius did not help.

    I had:

    Angular Workspace
      - projects
          - lib1
          - lib2
      - src
          - test application
    

    In fact I had moved a component from lib2 to lib1, by dragging the folder in WebStorm. By doing this, the references in lib2 to that component were not removed but updated and pointed to the source-folder of lib1. I forgot to remove these references which were no longer needed in lib2. After removing all references to the component in lib2, that library compiled.

    I had to remove the references in

    • public_api.ts
    • ./lib/lib2.module.ts

    Maybe there are more references in your project.

提交回复
热议问题