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.

Running `ng lint` is throws `Cannot read property '1' of undefined at Rule.SelectorRule`

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.0.0 node: 7.7.2 os: win32 x64 @angular/animations: 4.0.1 @angular/common: 4.0.1 @angular/compiler: 4.0.1 @angular/core: 4.0.1 @angular/forms: 4.0.1 @angular/http: 4.0.1 @angular/material: 2.0.0-beta.2 @angular/platform-browser: 4.0.1 @angular/platform-browser-dynamic: 4.0.1 @angular/router: 4.0.1 @angular/cli: 1.0.0 @angular/compiler-cli: 4.0.1

Repro steps.

Running ng lint

The log given by the failure.

Cannot read property ‘1’ of undefined TypeError: Cannot read property ‘1’ of undefined at Rule.SelectorRule [as constructor] (D:\Projects\cfna\client\node_modules\codelyzer\selectorNameBase.js:21:25) at new Rule (D:\Projects\cfna\client\node_modules\codelyzer\directiveSelectorRule.js:16:47) at Object.loadRules (D:\Projects\cfna\client\node_modules\tslint\lib\ruleLoader.js:47:32) at Linter.getEnabledRules (D:\Projects\cfna\client\node_modules\tslint\lib\linter.js:177:44) at Linter.lint (D:\Projects\cfna\client\node_modules\tslint\lib\linter.js:76:33) at files.forEach (D:\Projects\cfna\client\node_modules@angular\cli\tasks\lint.js:37:24) at Array.forEach (native) at lintConfigs.map (D:\Projects\cfna\client\node_modules@angular\cli\tasks\lint.js:30:19) at Array.map (native) at Class.run (D:\Projects\cfna\client\node_modules@angular\cli\tasks\lint.js:21:14)

Desired functionality.

Having the linter run without throwing an error.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
cexbrayatcommented, Apr 6, 2017

You should stick to codelyzer 2.x and tslint 4.x: they are the only one officially supported by the CLI right now. Codelyzer v3 is still in beta, you will face issue with the latest ones. We will update the CLI when they are stable enough.

If you really want to upgrade and are facing issues, you can try to open them on the Codelyzer repository

0reactions
angular-automatic-lock-bot[bot]commented, Sep 7, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TSLINT : TypeError: Cannot read property '0' of undefined
Getting the below error while trying to run tslint. The linting fails and no issues are being reported for any typescript (ts) file....
Read more >
Tslint: TypeError: Cannot read property '1' of undefined
What steps will reproduce the problem? 1. Use the command prompt (CMD or PowerShell in Windows) to create a new project that includes...
Read more >
How to Avoid the Infamous "Cannot read properties of ... - Bitovi
As a JavaScript developer, I'm sure you've encountered the frustrating runtime TypeError Cannot read properties of undefined .
Read more >
Cldr throws the "Cannot read property 'split' of undefined" error
Cldr throws the "Cannot read property 'split' of undefined" error ... node_modules/@angular/cli/bin/ng serve --disable host check", ...
Read more >
Core.js:19865 ERROR TypeError: Cannot read property ...
Getting below error on screen share button core.js:19865 ERROR TypeError: Cannot read property 'getDisplayMedia' of undefined Any idea what ...
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