Skip to content

opening a ts file in the editor (without textmate coloring) results in an exception #119

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

Closed
jcompagner opened this issue Dec 15, 2016 · 7 comments
Milestone

Comments

@jcompagner
Copy link

ts.TypeScriptException: [tsserver] file cannot be null
at ts.nodejs.NodejsProcess.checkFile(NodejsProcess.java:57)
at ts.nodejs.NodejsProcess.(NodejsProcess.java:44)
at ts.nodejs.NodejsProcessManager.create(NodejsProcessManager.java:85)
at ts.client.TypeScriptServiceClient.(TypeScriptServiceClient.java:134)
at ts.resources.TypeScriptProject.createServiceClient(TypeScriptProject.java:240)
at ts.resources.TypeScriptProject.getClient(TypeScriptProject.java:200)
at ts.resources.TypeScriptProject.openFile(TypeScriptProject.java:87)
at ts.resources.AbstractTypeScriptFile.open(AbstractTypeScriptFile.java:90)
at ts.eclipse.ide.internal.core.resources.IDETypeScriptProject.openFile(IDETypeScriptProject.java:175)
at ts.eclipse.ide.internal.ui.EditorActivationTracker$2.run(EditorActivationTracker.java:92)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

@angelozerr
Copy link
Owner

I think it's because your TypeScript Runtime is not good. Select the well TypeScript Runtime in the preferences JavaScript / TypeScript / Runtime.

I must fix this problem in the #121

@jcompagner
Copy link
Author

What ever I try (I use the embedded, it now says 2.1.4) that doesn't help, I can't change to something else really but toggling everything I know doesn't fix it.

Will try to debug it my self later

@angelozerr
Copy link
Owner

Perhaps your embed TypeScript Runtime preferences is setted in your project properties? To open it, open your tsconfig.json and you will see a link to your TypeScript Runtime (I think it will display "null"). Click on this link and change your Runtime.

@jcompagner
Copy link
Author

my tsconfig.json only is this:

{
"compilerOptions": {
"module": "commonjs",
"sourceMap": false
},
"include": [
"META-INF/**/*.ts"
]
}

i do use project settings, but those are not stored in the tsconfig file but in the project specific files (in the .settings dir of the project)

and if i open the ts.eclipse.ide.core.prefs file then i see the problem:

embeddedTypeScriptId=TypeScript (2.0.6)

that should be 2.1.4 i guess. But the ui you don't see that... there you really see "TypeScript 2.1.4"
I see it 2 times also for the tslintembedded

but even toggling first to installed type script (and give a path) then back to embedded doesn't store the correct value, only pressing Restore Defaults and then selecting it all again and then it is saved correctly.

So this is something that should be looked at i guess, if there is really only 1 option for that list and that is not the selected value, we should update it automatically or i guess have an empty value in it selected..

@jcompagner
Copy link
Author

i updated to the latest and now textmate also works, and fixing the project settings made all the other problems also fine. (textmate is only visible the first time you open a file i think, then i guess plugins are loaded in, the second time it is not really visible anymore

1 thing is weird, in 1 project i get a warning on top of the file that the file is not included in the tsconfig files selection (but i don't use that i just use include), but the weird thing is in another project that also only uses include pattern instead of files it doesn't say that..

@angelozerr
Copy link
Owner

So this is something that should be looked at i guess, if there is really only 1 option for that list and that is not the selected value, we should update it automatically or i guess have an empty value in it selected..

See #121

textmate is only visible the first time you open a file i think, then i guess plugins are loaded in, the second time it is not really visible anymore

You mean that textmate is working? Do you like it? It's not perfect (there is some problem with big big ts file)

1 thing is weird, in 1 project i get a warning on top of the file that the file is not included in the tsconfig files selection (but i don't use that i just use include), but the weird thing is in another project that also only uses include pattern instead of files it doesn't say that..

See #86

@angelozerr angelozerr added this to the 1.2.0 milestone Dec 22, 2016
@angelozerr
Copy link
Owner

#121 should fix this 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

2 participants