question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Illegal state: Could not load the summary for directive ObserveContent

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Angular Material and the CDK’s latest release/master is compatible with Angular 5.0.0-rc.7+ and Angular CLI 1.5.0-rc.5+.

What is the current behavior?

Build fails with the following error:

ERROR in Error: Illegal state: Could not load the summary for directive ObserveContent in /Users/splaktar/Git/tf/webapp/node_modules/@angular/cdk/observers/typings/index.d.ts.

What are the steps to reproduce?

Unable to reproduce in Stackblitz. Closest I came was https://stackblitz.com/edit/angular-material-with-angular-v5 which gives no errors.

I was unable to get @angular/flex-layout to build since it requires a version from master or angular/flex-layout-builds which isn’t accessible to Stackblitz (since not on NPM). I’m not having that problem in my local build.

What is the use-case or motivation for changing an existing behavior?

Dev and production builds passing.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular CLI: 1.5.0-rc.5
Node: 6.11.0
OS: darwin x64
Angular: 5.0.0-rc.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker

@angular/cdk: 2.0.0-beta.12-0ea4370
@angular/cli: 1.5.0-rc.5
@angular/flex-layout: 2.0.0-beta.9-99e7450
@angular/material: 2.0.0-beta.12-0ea4370
@angular-devkit/build-optimizer: 0.0.31
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.34
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0-rc.5
@schematics/angular: 0.0.48
typescript: 2.4.2
webpack: 3.8.1

I also tried with CDK and material2 on beta.12.

Is there anything else we should know?

No

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:35 (15 by maintainers)

github_iconTop GitHub Comments

22reactions
Splaktarcommented, Nov 2, 2017

OK, after numerous hours working on a reproduction and then changing code/config one at a time and rebuilding in AOT mode… I have finally solved this.

In my tsconfig.app.json file, I had the following:

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    ...
    "rootDir": ".",
    ...
  },
  ...
}

This had been here for 6+ months w/o any issues.

According to the TypeScript docs, this flag is for:

–rootDir | string | (common root directory is computed from the list of input files) | Specifies the root directory of input files. Only use to control the output directory structure with --outDir.

I have no idea if this was something that was part of the CLI at some point, or if it was some custom config added to fix a previous issue.

But just removing this single line of config, and my AOT build failures with the CDK are now solved!

3reactions
klausjcommented, Nov 24, 2017

In my case it did not help. I have "rootDir": "src" in my tsconfig and cannot simply remove this line.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Illegal state: Could not load the summary for directive ...
Hey guys, I am trying to use devextreme with Angular 5. I have run the following command to install the npm packages: npm...
Read more >
Zotonic - Read the Docs
On first start Zotonic will be compiled and all dependencies are fetched. This can take quite some time if you are not running...
Read more >
Recommender systems and the amplification of extremist ...
Abstract : Policymakers have recently expressed concerns over the role of recommendation algorithms and their role in forming “filter ...
Read more >
Untitled - Total Transportation of Mississippi
This Handbook contains information about the major employment policies and practices of Total. Transportation. We expect each employee to read this Handbook ...
Read more >
Employee Handbook - My Hiram
The College will not tolerate discrimination against its students, faculty, or staff. If an employee believes that the actions or words of a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found