- This topic has 1 reply, 2 voices, and was last updated 8 years ago by gorand.
-
AuthorPosts
-
gorandParticipantHellow!
After updating webclipse all previously created files, you receive the error typescript!
Rebuild project not remove this error.Attachments:
You must be logged in to view attached files.
support-piotrParticipantGorand,
I am really sorry that you see this issue. I hope we can resolve this issue quickly. Can you please share Error Log details (use export log action from the Error Log view toolbar)? Can I get a screenshot of Problems view? Is this an Angular project?
Best regards,
Piotr Tomiak
support-piotrParticipantGoran,
I’ve checked in the code where this message can come from. This looks indeed like a problem with TSLint. Can you please share your tsconfig.json, tslint.json and package.json also, so that I can reproduce the issue?
Best regards,
Piotr Tomiak- This reply was modified 8 years ago by support-piotr.
gorandParticipantHellow!
No is not Angular project, is TypeScript project with disabled autocompile to js.
I want to help in the removal of all TypeScript problems, because Now webclipse began working with tslint and it’s very good!Attachments:
You must be logged in to view attached files.
gorandParticipanttsconfig
tslint
typescript/package.json
tslint/package.json
gorandParticipanttsconfig.json
{
“compilerOptions”: {
“target”: “ES3”,
“module”: “none”,
“moduleResolution”: “classic”
},
“compileOnSave”: false
}tslint.json
{
“extends”: “tslint:latest”,
“rules”: {
“class-name”: true,
“semicolon”: [true, “always”],
“no-unused-variable”: true,
“no-duplicate-variable”: true,
“no-inferrable-types”: true,“no-namespace”: false,
“indent”: false,
“member-access”: false,
“whitespace”: false,
“typedef-whitespace”: false,
“no-trailing-whitespace”: false,
“only-arrow-functions”: false,
“variable-name”: [true, “ban-keywords”],
“radix”: false,“comment-format”: [false, “check-space”],
“no-eval”: false,
“no-internal-module”: false,
“no-var-keyword”: false,
“one-line”: [false, “check-open-brace”, “check-whitespace”],
“quotemark”: [false, “double”, “avoid-escape”],
“triple-equals”: [false, “allow-null-check”],
“interface-name”: false,
“max-line-length”: [false, 140],
“member-ordering”: [false,
“public-before-private”,
“static-before-instance”,
“variables-before-functions”
],
“no-null-keyword”: false
}
}
support-piotrParticipantGorand,
Thank you for all the provided information. Unfortunately I wasn’t able to reproduce the issue. Your Problems view contains TSLint diagnostics on other files, so I think the problem might be specific to some of your files. I have updated the code of TypeScript plugin, so that it logs stack trace of the internal error. You can download it from here:
To apply changes, please navigate with your system explorer to your Eclipse installation folder and:
- Browse into
plugins
folder - There should be a directory called
com.genuitec.eclipse.typescript_2.0.2.201611301658
, please rename it by e.g. adding.old
suffix - Create a new folder with that name
com.genuitec.eclipse.typescript_2.0.2.201611301658
- Extract contents of the provided zip file to the newly created dir.
- Run Eclipse with
-clean
flag. You can do one of the following:- Edit eclipse.ini file and add the flag
-clean
on a new line above-vmargs
line (remember to remove the flag after first launch as it increases launch times) - Run eclipse.exe from the command line with the flag:
eclipse.exe -clean
- Edit eclipse.ini file and add the flag
Please reproduce the issue by typing within the problematic file. Errors should get logged into Error log. Please paste here the stack trace of one of them. Thank you for your feedback!
Best regards,
Piotr Tomiak- This reply was modified 8 years ago by support-piotr.
support-piotrParticipantHi Gorand,
Thanks for checking! The error will still be there. It should say “TSLint internal error: …”. If you see “TSLint” prefix in the error than you have properly updated the plugin, if not than please double check if you followed all of the steps.
Along with that warning marker, there will be an exception logged to Error Log (which wasn’t logged before) every time the file is validated (which means there will be plenty of errors logged when you type in the problematic file). I need stack trace of at least one of them (you can include whole error log) to try to locate and fix the issue. We are going to make a new release in around 2 weeks and it would be great if you can provide me with the stack trace before, so that I can ensure your problem is fixed.
Best regards,
Piotr Tomiak
support-piotrParticipantHi Gorad,
I am really sorry, I have missed the attached log to your first post. It indeed contains the error I was looking for. Thanks! By looking at the stack trace, I can say that the problem happens within the TypeScript compiler node module and it will be very hard to fix the issue based on static analysis. Is there any chance you could share one of the problematic files with us? You can send it to support@genuitec.com if you don’t want it to be visible on the forum.
Best regards,
Piotr Tomiak
support-piotrParticipantGorand,
Thanks for information! The problem happens with “ordered-imports” TSLint rule. When you remove “extends” part from TSLint config, you must be disabling the rule, which is a default TSLint rule. Something within your TS file causes TSLint or TypeScript to blow up. If you look at the stack trace:
TypeError: Cannot read property 'text' of undefined at Object.getTokenPosOfNode(...\node_modules\typescript\lib\typescript.js:5574:71) at TokenObject.TokenOrIdentifierObject.getStart(...\node_modules\typescript\lib\typescript.js:53297:23) at OrderedImportsWalker.visitNode(...\node_modules\tslint\lib\rules\orderedImportsRule.js:103:33) ... at OrderedImportsWalker.SyntaxWalker.walk(...\node_modules\tslint\lib\language\walker\syntaxWalker.js:7:14) at Rule.AbstractRule.applyWithWalker(...\node_modules\tslint\lib\language\rule\abstractRule.js:19:16) at Rule.apply(...\node_modules\tslint\lib\rules\orderedImportsRule.js:15:21) at Linter.lint(...\node_modules\tslint\lib\tslint.js:68:37) ...
the error comes directly from within TSLint code. This looks like a bug either within TSLint itself (the ordered import rule), or within TypeScript. I will try to fix the issue. However, without an example file from you, which is marked with that warning “Can not read property ‘text’ of undefined”, I unfortunately cannot guarantee that the problem will be 100% fixed.
Best regards,
Piotr Tomiak -
AuthorPosts