Illegal state: Could not load the summary for directive ObserveContent
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
I'm facing the same problem. any fix for this?
I can't just remove "rootDir": "src", so any news how to fix this issue?
Any progress on this? I have the same issue and not able to remove the rootdir
Hi,
I have the same problem, a version for fix this is schedule?
My tsconfig.app.json:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"baseUrl": "./",
"module": "es2015",
"types": [
"node",
"jasmine",
"core-js"
]
},
"exclude": [
"test.ts",
"**/*.spec.ts",
"**/*.mock.ts",
"**/*.stub.ts"
]
}
Error message on build:
ERROR in : Illegal state: Could not load the summary for directive CdkObserveContent in /home/manuel/public_html/winlassie-ihm/node_modules/@angular/cdk/observers/typings/index.d.ts.
- Angular version: ^5.2.8
- Angular material & cdk version: ^5.2.3
Thanks
No there is no progress on this issue. It is closed. No one is working on it.
You may want to post on StackOverflow first as this issue is generally caused by a misconfiguration of TypeScript in your specific application and not directly related to Angular Material.
If that is unsuccessful and you are sure that your TypeScript configuration is complete (and you've consulted the TypeScript docs), then please open a new issue with a Stackblitz or GitHub demo where the team can reproduce and debug the issue.
I don't know, where this came from, but in my case it was a tsconfig problem:
I hat the following:
"skipTemplateCodeGen": true,
instead of:
"skipTemplateCodegen": true,
in "angularCompilerOptions" in tsconfig.lib.ts
probably got copied from somewhere by accident.
I can confirm that setting skipTemplateCodegen to true will make the error go away.
But this is because the error will only appear if skipTemplateCodegen is set to false.
$ grep skipTemplateCodegen node_modules/@angular -R
node_modules/@angular/compiler-cli/src/transformers/compiler_host.js: // if skipTemplateCodegen is set and fullTemplateTypeCheck is not yet set,
node_modules/@angular/compiler-cli/src/transformers/compiler_host.js: if (this.options.skipTemplateCodegen && !this.options.fullTemplateTypeCheck) {
node_modules/@angular/compiler-cli/src/transformers/api.d.ts: skipTemplateCodegen?: boolean;
node_modules/@angular/compiler-cli/src/perform_compile.js: if (options.skipTemplateCodegen) {
node_modules/@angular/compiler-cli/src/ngtools_api2.d.ts: skipTemplateCodegen?: boolean;
While debugging I also ended up in transformers/compiler_host.js, but didn't find the actual reason for failure yet.
I have also ran into this issue when I installed one npm package called 'ng-pick-datetime'. I managed to solve this issue by adding these two paths in include array of tsconfig.json:
{
"compileOnSave": false,
"include": ["node_modules/ng-pick-datetime/node_modules/@angular/cdk/**/typings/index.d.ts", "node_modules/@angular/cdk/**/typings/index.d.ts", "src/**/*.ts"],
"exclude": ["**/*.spec.ts"],
"compilerOptions": {
........
}
}
So I think it can fix the issue.
any other solves? editing the json doesn't work for me
Same by @hansl . I have this issue with CdkAriaLive:
ERROR in : Illegal state: Could not load the summary for directive CdkAriaLive in ...../node_modules/@angular/cdk/a11y/typings/index.d.ts.
I tried to modify tsconfig.
I don't have the 'rootDir' option in 'tsconfig.json', I tried to add ,But there is still this mistake. Then I tried
ng build
Instead of ng build --prod It helps me.
@csaszika please open a new issue with a reproduction. Go Pats!
@Splaktar sorry for late answer, after some investigation I have created a new project with upgraded versions so with angular(7.2.13) and material(7.3.8) and I cannot reproduce the issue anymore. If I meet with the same issue, then I update my comment. Thanks for comments
@HarshMathur Thank you for your solution , it really helps me a lot . I think default tsconfig.ts doesn't include those *.ts in node_modules document , since it doesn't have "files" and "includes" options.
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.