Running `ng lint` is throws `Cannot read property '1' of undefined at Rule.SelectorRule`
See original GitHub issueBug 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:
- Created 6 years ago
- Comments:8 (1 by maintainers)
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
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.