Skip to content

ts lint oneLineRule fail #833

Closed
Closed

Description

@circy

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

Activity

  1. yyyyyyuanfei commented on Aug 12, 2016

    @yyyyyyuanfei

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

  2. circy commented on Aug 12, 2016

    @circy
    Author

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

  3. yyyyyyuanfei commented on Aug 12, 2016

    @yyyyyyuanfei

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

  4. circy commented on Aug 12, 2016

    @circy
    Author

    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

  5. yyyyyyuanfei commented on Aug 12, 2016

    @yyyyyyuanfei

    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.

  6. circy commented on Aug 12, 2016

    @circy
    Author

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

  7. circy commented on Aug 12, 2016

    @circy
    Author

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

  8. jreichardt commented on Aug 24, 2016

    @jreichardt

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

  9. katallaxie commented on Aug 28, 2016

    @katallaxie
    Contributor

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

  10. circy commented on Aug 28, 2016

    @circy
    Author

    yo nice. its runnig. thx

  11. xtianus79 commented on Nov 9, 2016

    @xtianus79

    this is still an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions