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

ts lint oneLineRule fail #833

Closed
circy opened this issue Aug 4, 2016 · 11 comments
Closed

ts lint oneLineRule fail #833

circy opened this issue Aug 4, 2016 · 11 comments

Comments

@circy
Copy link

circy commented Aug 4, 2016

angular2-webpack-starter@5.0.5 tslint C:\Projects\logger\src\webapp
tslint "src/*/.ts"

C:\Projects\logger\src\webapp\node_modules\tslint\lib\rules\oneLineRule.js:163
if (body.kind === ts.SyntaxKind.ModuleBlock) {
^

TypeError: Cannot read property 'kind' of undefined
at OneLineWalker.visitModuleDeclaration (C:\Projects\logger\src\webapp\node_modules\tslint\lib\rules\oneLineRule.js:163:17)
at OneLineWalker.SyntaxWalker.visitNode (C:\Projects\logger\src\webapp\node_modules\tslint\lib\language\walker\syntaxWalker.js:366:22)
at C:\Projects\logger\src\webapp\node_modules\tslint\lib\language\walker\syntaxWalker.js:459:63
at visitEachNode (C:\Projects\logger\src\webapp\node_modules\typescript\lib\typescript.js:7959:30)
at Object.forEachChild (C:\Projects\logger\src\webapp\node_modules\typescript\lib\typescript.js:8117:24)
at OneLineWalker.SyntaxWalker.walkChildren (C:\Projects\logger\src\webapp\node_modules\tslint\lib\language\walker\syntaxWalker.js:459:12)
at OneLineWalker.SyntaxWalker.visitSourceFile (C:\Projects\logger\src\webapp\node_modules\tslint\lib\language\walker\syntaxWalker.js:190:14)
at OneLineWalker.SyntaxWalker.visitNode (C:\Projects\logger\src\webapp\node_modules\tslint\lib\language\walker\syntaxWalker.js:414:22)
at OneLineWalker.SyntaxWalker.walk (C:\Projects\logger\src\webapp\node_modules\tslint\lib\language\walker\syntaxWalker.js:7:14)
at Rule.AbstractRule.applyWithWalker (C:\Projects\logger\src\webapp\node_modules\tslint\lib\language\rule\abstractRule.js:19:16)

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "tslint" "src/**/.ts"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@5.0.5 tslint: tslint "src/**/_.ts"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-webpack-starter@5.0.5 tslint script 'tslint "src/__/_.ts"'.
npm ERR! This is most likely a problem with the angular2-webpack-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tslint "src/
/.ts"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-webpack-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Projects\logger\src\webapp\npm-debug.log

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "lint"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@5.0.5 lint: npm run tslint "src/**/*.ts"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-webpack-starter@5.0.5 lint script 'npm run tslint "src//*.ts"'.
npm ERR! This is most likely a problem with the angular2-webpack-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run tslint "src/
/*.ts"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-webpack-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Projects\logger\src\webapp\npm-debug.log

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "ci"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@5.0.5 ci: npm run lint && npm test && npm run e2e
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-webpack-starter@5.0.5 ci script 'npm run lint && npm test && npm run e2e'.
npm ERR! This is most likely a problem with the angular2-webpack-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run lint && npm test && npm run e2e
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-webpack-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Projects\logger\src\webapp\npm-debug.log

@yuanfeiz
Copy link

Update tslint to "tslint@next" should be able to solve this issue.

@circy
Copy link
Author

circy commented Aug 12, 2016

after npm update tslint@next, i have the same problem.

@yuanfeiz
Copy link

Can you try to remove the package from "node_modules" and install it again?

@circy
Copy link
Author

circy commented Aug 12, 2016

it looks like I have now a bigger trouble :D
:/

npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package tslint does not satisfy its siblings' peerDepen
dencies requirements!
npm ERR! peerinvalid Peer codelyzer@0.0.28 wants tslint@^3.9.0
npm ERR! peerinvalid Peer tslint-loader@2.1.5 wants tslint@^3.0.0

@yuanfeiz
Copy link

yuanfeiz commented Aug 12, 2016

It's alright, the issue is because next doesn't follow the semver, so the packages which depends on tslint gets confused. But it won't prevent you from using the linter.

@circy
Copy link
Author

circy commented Aug 12, 2016

ok, but goes with me is no more. :D
I clone now new again. have and try again.

@circy
Copy link
Author

circy commented Aug 12, 2016

have now again all been newly started, but unfortunately still does not go.

@jreichardt
Copy link

Seems to be a bug in tslint: palantir/tslint#1425

@katallaxie
Copy link
Contributor

We can use the latest tslint as in #911; this fixes it, as is in the latest tslint branch.

@circy
Copy link
Author

circy commented Aug 28, 2016

yo nice. its runnig. thx

@xtianus79
Copy link

this is still an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants