Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta.22 tslint hangs for me #3404

Closed
JohannesRudolph opened this issue Dec 5, 2016 · 10 comments
Closed

Beta.22 tslint hangs for me #3404

JohannesRudolph opened this issue Dec 5, 2016 · 10 comments
Labels
needs: more info Reporter must clarify the issue

Comments

@JohannesRudolph
Copy link
Contributor

Please provide us with the following information:

OS?

OS X El Cap

Versions.

$ ng --version
angular-cli: 1.0.0-beta.22
node: 6.9.1
os: darwin x64

Repro steps.

Upgraded my project from beta.21, accepted all changes to tslint.json (if that matters)

The log given by the failure.

None, it just hangs for more than 60s, consuming 100%CPU (single core). Previously linting took less than 3 sec. Didn't have the patience to wait for it to complete.

Mention any other details that might be useful.

Might be a tslint issue after all and without a stacktrace there's not a lot I can do for you I'm afraid. just wanted to inform you that I hit this issue and that I wouldn't consider tslint 4.0 suitable for angular-cli unless the underlying issue is resolved. Might be worth tracking palantir/tslint#1131

@grizzm0
Copy link
Contributor

grizzm0 commented Dec 5, 2016

Did you also update codelyzer and tslint in package.json? Did you try deleting node_modules and do a fresh npm install?

@JohannesRudolph
Copy link
Contributor Author

JohannesRudolph commented Dec 5, 2016 via email

@grizzm0
Copy link
Contributor

grizzm0 commented Dec 5, 2016

Yes, works just fine for me.

@hansl
Copy link
Contributor

hansl commented Dec 5, 2016

Works for me too. Could you provide your package.json?

@hansl hansl added the needs: more info Reporter must clarify the issue label Dec 5, 2016
@JohannesRudolph
Copy link
Contributor Author

JohannesRudolph commented Dec 5, 2016 via email

@hansl
Copy link
Contributor

hansl commented Dec 5, 2016

Reformatting:

{
  "name": "redacted",
  "version": "0.0.0",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "ng": "ng",
    "start": "ng serve --target=${TARGET:-development}
--environment=${ENVIRONMENT:-dev} --aot=${AOT:-false} --port 9001",
    "lint": "tslint \"src/**/*.ts\"",
    "test": "ng test --watch false",
    "build": "ng build --target=${TARGET:-development}
--environment=${ENVIRONMENT:-dev} --aot=${AOT:-true}",
    "pree2e": "webdriver-manager update",
    "e2e": "protractor",
    "ci": "npm run lint && npm run build && npm run test && node
run-e2e.js",
    "servebuilt": "http-server -a localhost -p 9001 ./dist",
    "privateci": "fly -t ci execute -c ./../ci/build.yml -i repo=./../ -x"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "^2.2.1",
    "@angular/compiler": "^2.2.3",
    "@angular/core": "^2.2.3",
    "@angular/forms": "^2.2.1",
    "@angular/http": "^2.2.1",
    "@angular/platform-browser": "^2.2.1",
    "@angular/platform-browser-dynamic": "^2.2.1",
    "@angular/router": "^3.2.1",
    "@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.14",
    "angular2-infinite-scroll": "^0.2.6",
    "angular2-notifications": "0.4.46",
    "bootstrap": "4.0.0-alpha.5",
    "chart.js": "~2.3.0",
    "core-js": "^2.4.1",
    "font-awesome": "^4.7.0",
    "ng2-slim-loading-bar": "^2.0.4",
    "rxjs": "5.0.0-beta.12",
    "ts-helpers": "^1.1.1",
    "zone.js": "^0.6.23"
  },
  "devDependencies": {
    "@angular/compiler-cli": "^2.2.3",
    "@types/chart.js": "0.0.7",
    "@types/jasmine": "2.5.38",
    "@types/node": "^6.0.42",
    "angular-cli": "1.0.0-beta.22",
    "codelyzer": "~2.0.0-beta.1",
    "http-server": "^0.9.0",
    "jasmine-core": "2.5.2",
    "jasmine-spec-reporter": "2.5.0",
    "karma": "1.2.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-cli": "^1.0.1",
    "karma-jasmine": "^1.0.2",
    "karma-remap-istanbul": "^0.2.1",
    "protractor": "4.0.9",
    "sass-material-colors": "^0.0.5",
    "ts-node": "1.2.1",
    "tslint": "^4.0.2",
    "typescript": "~2.0.3",
    "webdriver-manager": "10.2.5"
  }
}

@hansl
Copy link
Contributor

hansl commented Dec 5, 2016

@mgechev The above seems correct to me for versions. Would you have any insights on this issue?

@JohannesHoppe Unfortunately, everything seems to be in order. It might be related to that issue above on tslint itself. Unless Minko has any insights, I'm going to close this, as it is not an issue with the CLI.

One last thing you can try is to actually nuke your node_modules and reinstall:

rm -rf node_modules/
npm cache clean
npm install

@hansl hansl closed this as completed Dec 5, 2016
@mgechev
Copy link
Member

mgechev commented Dec 6, 2016

Could be related to either tslint or codelyzer. It will be great if you can share minimal demo where you can reproduce the issue.

@JohannesRudolph
Copy link
Contributor Author

Thanks for taking the time to look at this issue @hansl and @mgechev. I did some more digging by manually including rules of my tslint.json one-by-one and have found that adding each of these rules individually seems to cause linting to take unreasonable time (i.e. I kill it before loosing patience after 2min):

    "no-input-rename": true,
    "no-output-rename": true,
    "component-class-suffix": true,
    "directive-class-suffix": true,
    "no-access-missing-member": true,
    "templates-use-public": true,

I strongly suspect this is a codelyzer issue, which might be related to my code specifically.

Here's a run without and then with one of these rules

iDevBook01:console jr$ time ng lint

> redacted@0.0.0 lint /Users/jr/dev/console/console
> tslint "src/**/*.ts" #beware, ng lint is a wrapper for npm run lint, https://github.com/angular/angular-cli#linting-and-formatting-code


All files pass linting.

real	0m8.425s
user	0m7.979s
sys	0m0.718s
iDevBook01:console jr$ time ng lint
^C

real	1m54.526s
user	0m2.610s
sys	0m0.364s
iDevBook01:console jr$ 

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: more info Reporter must clarify the issue
Projects
None yet
Development

No branches or pull requests

4 participants