Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Tyler-V opened this issue May 3, 2018 · 7 comments
Assignees

Comments

@Tyler-V
Copy link

Tyler-V commented May 3, 2018

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.

@donroyco
Copy link
Contributor

donroyco commented May 3, 2018

Have you checked this comment?

@Tyler-V
Copy link
Author

Tyler-V commented May 3, 2018

@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"
      ]
    }
  }
}

@josephperrott
Copy link
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?

@Tyler-V
Copy link
Author

Tyler-V commented May 3, 2018

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

@Tyler-V
Copy link
Author

Tyler-V commented May 4, 2018

@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

@jelbourn
Copy link
Member

jelbourn commented Oct 5, 2018

Closing this since I believe it is obsolete

@jelbourn jelbourn closed this as completed Oct 5, 2018
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants