Keep getting this error: Cannot read property 'kind' of undefined
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [x ] bug report -> please search issues before submitting
- [ ] feature request
Command (mark with an x
)
- [ ] new
- [ ] build
- [x ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Versions
Angular CLI: 7.1.2 Node: 8.11.4 OS: win32 x64 Angular: 7.1.2 … animations, cli, common, compiler, compiler-cli, core, forms … http, language-service, platform-browser … platform-browser-dynamic, router
Package Version
@angular-devkit/architect 0.11.2 @angular-devkit/build-angular 0.11.2 @angular-devkit/build-optimizer 0.11.2 @angular-devkit/build-webpack 0.11.2 @angular-devkit/core 7.1.2 @angular-devkit/schematics 7.1.2 @angular/cdk 7.1.1 @ngtools/webpack 7.1.2 @schematics/angular 7.1.2 @schematics/update 0.11.2 rxjs 6.3.3 typescript 3.1.6 webpack 4.23.1
Repro steps
Happens many times a day when saving a file and the cli re-compiles
The log given by the failure
Failed to compile.
: TypeError: Cannot read property ‘kind’ of undefined at getAssignmentTargetKind (node_modules\typescript\lib\typescript.js:10049:28) at Object.isAssignmentTarget (node_modules\typescript\lib\typescript.js:10092:16) at checkObjectLiteral (node_modules\typescript\lib\typescript.js:46107:45) at checkExpressionWorker (node_modules\typescript\lib\typescript.js:50748:28) at checkExpression (node_modules\typescript\lib\typescript.js:50696:42) at checkExpressionWithContextualType (node_modules\typescript\lib\typescript.js:50524:26) at checkApplicableSignature (node_modules\typescript\lib\typescript.js:47963:35) at chooseOverload (node_modules\typescript\lib\typescript.js:48281:26) at resolveCall (node_modules\typescript\lib\typescript.js:48231:26) at resolveCallExpression (node_modules\typescript\lib\typescript.js:48534:20) at resolveSignature (node_modules\typescript\lib\typescript.js:48800:28) at getResolvedSignature (node_modules\typescript\lib\typescript.js:48844:26) at checkCallExpression (node_modules\typescript\lib\typescript.js:48936:29) at checkExpressionWorker (node_modules\typescript\lib\typescript.js:50759:28) at checkExpression (node_modules\typescript\lib\typescript.js:50696:42) at resolveDecorator (node_modules\typescript\lib\typescript.js:48741:28)
Desired functionality
No errors
Details: This started when Angular 7 was released. Unfortunately I wasn’t able to find much information about this issue. Neither on Stackoverflow nor in the issue trackers. Well at least not since the release of Angular 7
Issue Analytics
- State:
- Created 5 years ago
- Reactions:17
- Comments:35 (1 by maintainers)
Getting the same error with angular-cli 8.3.0 trying to set up angular universal.
First step in the guide says to run:
ng add @nguniversal/express-engine --clientProject <angular-project>
Doing that seems to install @nguniversal/express-engine properly, but then I get:
Cannot read property 'kind' of undefined
@harshsyno The problem is, this still happens when I tried adding my old components/modules to a completely new project using the latest angular-cli 😐
Still having this issue. It’s so annoying