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.

TypeError: Cannot read property 'kind' of undefined

See original GitHub issue

I get the following:

TypeError: Cannot read property 'kind' of undefined
    at /Users/rolandjitsu/Projects/infarm/dashboard/node_modules/codelyzer/selectorNameBase.js:79:50
    at Array.forEach (native)
    at SelectorNameValidatorWalker.validateSelector (/Users/rolandjitsu/Projects/infarm/dashboard/node_modules/codelyzer/selectorNameBase.js:77:18)
    at SelectorNameValidatorWalker.validateDecorator (/Users/rolandjitsu/Projects/infarm/dashboard/node_modules/codelyzer/selectorNameBase.js:70:18)
    at Array.forEach (native)
    at SelectorNameValidatorWalker.visitClassDeclaration (/Users/rolandjitsu/Projects/infarm/dashboard/node_modules/codelyzer/selectorNameBase.js:58:33)
    at SelectorNameValidatorWalker.SyntaxWalker.visitNode (/Users/rolandjitsu/Projects/infarm/dashboard/node_modules/tslint/lib/language/walker/syntaxWalker.js:264:22)
    at /Users/rolandjitsu/Projects/infarm/dashboard/node_modules/tslint/lib/language/walker/syntaxWalker.js:459:63
    at visitEachNode (/Users/rolandjitsu/Projects/infarm/dashboard/node_modules/typescript/lib/typescript.js:8247:30)
    at Object.forEachChild (/Users/rolandjitsu/Projects/infarm/dashboard/node_modules/typescript/lib/typescript.js:8405:24)
    at SelectorNameValidatorWalker.SyntaxWalker.walkChildren (/Users/rolandjitsu/Projects/infarm/dashboard/node_modules/tslint/lib/language/walker/syntaxWalker.js:459:12)
    at SelectorNameValidatorWalker.SyntaxWalker.visitBlock (/Users/rolandjitsu/Projects/infarm/dashboard/node_modules/tslint/lib/language/walker/syntaxWalker.js:28:14)
    at SelectorNameValidatorWalker.SyntaxWalker.visitNode (/Users/rolandjitsu/Projects/infarm/dashboard/node_modules/tslint/lib/language/walker/syntaxWalker.js:249:22)
    at /Users/rolandjitsu/Projects/infarm/dashboard/node_modules/tslint/lib/language/walker/syntaxWalker.js:459:63
    at visitNode (/Users/rolandjitsu/Projects/infarm/dashboard/node_modules/typescript/lib/typescript.js:8235:20)
    at Object.forEachChild (/Users/rolandjitsu/Projects/infarm/dashboard/node_modules/typescript/lib/typescript.js:8323:21)

I’m using:

  • codelyzer: 0.0.28
  • tslint: 3.15.1
  • ts-node: 1.3.0
  • typescript: 2.0.2

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mgechevcommented, Sep 14, 2016

@rolandjitsu thanks for digging into this! With the information you provided we should fix it in a day or two.

1reaction
rolandjitsucommented, Sep 14, 2016

Ok, so it boils down to this:

private static createComponent(selector: string, template: string): any {
    @Component({selector, template})
    class DynamicComponent {}
    return DynamicComponent;
}

I have a service that creates dynamic modules/components.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'kind' of undefined at ...
This problem started to occur when updating my Angular 6 project to 7.x. I opened an issue on the angular-cli github repo but...
Read more >
TypeError: Cannot read property 'kind' of undefined · Issue ...
TypeDoc exiting with unexpected error: TypeError: Cannot read property 'kind' of undefined at Object.isDeclaration (/home/surjit/practice/ ...
Read more >
Production Build Errors with smart-webcomponents-angular ...
node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js): TypeError: Cannot read property 'kind' of undefined
Read more >
Error with webpack: TypeError: Cannot read property &#03
I found it was caused by tooptips.directive.ts line 18. If I remove “@OnChange”. building will work. Now we will wait quietly for a...
Read more >
TypeError: Cannot read property 'kind' of undefined at ... - Dirask
I have got following error during my TypeScript project compilation into single file: I run my project with: tsconfig.prod.json file looks following way:...
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