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.

Keep getting this error: Cannot read property 'kind' of undefined

See original GitHub issue

Bug 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:closed
  • Created 5 years ago
  • Reactions:17
  • Comments:35 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
jer-txcommented, Aug 27, 2019

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

3reactions
therawkcommented, Jan 17, 2019

@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

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'kind' of undefined at ...
I ran into this problem and found a workaround in the case that upgrading Angular or other NPM packages isn't the ideal option...
Read more >
TypeError: Cannot read property 'kind' of undefined · Issue ...
TypeError : Cannot read property 'kind' of undefined #38383 ... I am still having this issue on node 14.17.0, typescript 4.2.4, ts-node 9.0.0....
Read more >
How to Avoid the Infamous "Cannot read properties of ... - Bitovi
That error message is telling you the function is returning undefined implicitly, but its return type does not include undefined in it. Awesome!...
Read more >
angular-cli - Cannot read property 'kind' of undefined - iTecNote
if I build with not --prod I do not get any error. Full error: ERROR in TypeError: Cannot read property 'kind' of undefined...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
The TypeError: Cannot read property of undefined is one of the most common type errors in JavaScript. It occurs when a property is...
Read more >

github_iconTop Related Medium Post

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