Skip to content

Cannot build AOT - 'Illegal state: Could not load the summary for directive CdkTrapFocus' #11124

Closed

Description

@Tyler-V

ng build --prod

ERROR in : Illegal state: Could not load the summary for directive CdkTrapFocus in C:/Users/Tyler/Documents/GitHub/@ngx-easy/projects/easy-grid/node_modules/@angular/cdk/a11y/typings/index.d.ts.

Activity

  1. donroyco commented on May 3, 2018

    @donroyco
    Contributor

    Have you checked this comment?

  2. Tyler-V commented on May 3, 2018

    @Tyler-V
    Author

    @donroyco thanks for the link,

    I'm using @angular/cli@latest and building out a library with the new commands so this question may be geared more towards cli / ng-packagr so I apologize if I opened this issue in the wrong area.

    My tsconfig.json in the src directory doesn't have the property rootDir.

    Inside the projects/* library directories, there are only .lint / .spec tsconfig.json files.

    tsconfig.json
    {
      "compileOnSave": false,
      "compilerOptions": {
        "baseUrl": "./",
        "outDir": "./dist/out-tsc",
        "sourceMap": true,
        "declaration": false,
        "moduleResolution": "node",
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "target": "es5",
        "typeRoots": [
          "node_modules/@types"
        ],
        "lib": [
          "es2017",
          "dom"
        ],
        "paths": {
          "easy-virtual-scroll": [
            "dist/easy-virtual-scroll"
          ],
          "easy-grid": [
            "dist/easy-grid"
          ]
        }
      }
    }
    
  3. josephperrott commented on May 3, 2018

    @josephperrott
    Member

    From looking at this a bit it looks like this might be an issues with your environment's setup. Were you able to try adding a rootDir to your tsconfig?

  4. Tyler-V commented on May 3, 2018

    @Tyler-V
    Author

    Hi @josephperrott, thanks for the reply.

    The issue listed above looks like the suggestion is to remove that line, not to add it unless I misunderstood.

    Regardless, adding to "compilerOptions" "rootDir": "." or "src" still results in the same

    ERROR in : Illegal state: Could not load the summary for directive CdkTrapFocus

  5. Tyler-V commented on May 4, 2018

    @Tyler-V
    Author

    @josephperrott / @donroyco

    This is still an issue in 6.0.0

    angular/angular-cli#10615

    ERROR in : Illegal state: Could not load the summary for directive Dir in C:/Users/Tyler/Documents/GitHub/@ngx-easy/projects/easy-grid/node_modules/@angular/cdk/bidi/typings/index.d.ts.

    Angular CLI: 6.0.0
    Node: 8.11.1
    OS: win32 x64
    Angular: 6.0.0
    ... animations, cdk, common, compiler, compiler-cli, core, forms
    ... http, language-service, material, platform-browser
    ... platform-browser-dynamic, router
    
    Package                            Version
    ------------------------------------------------------------
    @angular-devkit/architect          0.6.0 (cli-only)
    @angular-devkit/build-angular      0.6.0
    @angular-devkit/build-ng-packagr   0.6.0
    @angular-devkit/build-optimizer    0.6.0
    @angular-devkit/core               0.6.0 (cli-only)
    @angular-devkit/schematics         0.6.0 (cli-only)
    @ngtools/json-schema               1.1.0
    @ngtools/webpack                   6.0.0
    @schematics/angular                0.6.0 (cli-only)
    @schematics/update                 0.6.0 (cli-only)
    ng-packagr                         2.4.2
    rxjs                               6.1.0
    typescript                         2.7.2
    webpack                            4.6.0
    
  6. jelbourn commented on Oct 5, 2018

    @jelbourn
    Contributor

    Closing this since I believe it is obsolete

  7. angular-automatic-lock-bot commented on Sep 9, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  8. locked and limited conversation to collaborators on Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions