-
Notifications
You must be signed in to change notification settings - Fork 14
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.TypeScriptNoContentAvailableException on compile #190
Comments
It's the TypeScript tsserver which throw this error. I think this error should be silent and not display an error when tsserver throws it. |
How about the following code change in the IDETypeScriptProject class (two lines added):
|
But can we just ignore the exception really? Cause maybe there is really no content that is sent to the tsserver. The compilation then still fails (with or without error message). |
Same problem for me. Even with axelnerlich's small project: Sometimes I get a TypeScriptNoContentAvailableException when saving. Looks a bit terrifying... It seems to be a timing problem, because the exception appears more frequently, when saving is done directly after editing. Apart from this error, I'm really impressed by all the new features! Great work, anglozerr! |
Same here, would be nice when fixed as the popup only appears at some arbitrary moments after a save, but is very annoying. As mentioned, the error from the tsserver could be valid and the question is why this error is returned? Keep up the good work! |
I must study more cases whrn tsserver throws this error. If i remember it throws this error when you try tout savez a TS file which is excluded by tsconfih.JSON . it seems that there are more cases. |
@angelozerr: I have thoroughly tested your plugin for almost a week now. Everything looks very, very good, but this bug is really annoying. I will show your plugin tomorrow in a presentation to my collegues. We would like to decide on the usage of your plugin, but this bug could be a showstopper. If I could at least tell them, that there is a good chance that this bug will be fixed... |
I m on Holliday this week. I will try to fix it next week by ignoring this error everytime or on dôme cases if i understand cases when tsserver throws this error. |
@angelozerr: An observation: It seems to be a timing problem, because the exception appears more frequently, when saving is done directly after editing. If I wait some seconds after editing, the error is less frequent. |
Ok I have decided to ignore the TypeScriptNoContentAvailableException exception with 8fa29dc @axelnerlich I have used your project from TypeScriptNoContentAvailableException.zip and problem comes from tsserver. The first time when I save new_file.ts, the tsserver compileOnSaveEmitFile is executed to know while files must be compiled
An it returns *.d.ts files:
So after node_modules/@types/jquery/index.d.ts are compiled and the TypeScriptNoContentAvailableException is thrown (it's normal because we cannot compile this file). The second time, when I save new_file.ts, I have
So we have not the exception. Is it a bug with TypeScript? The popup is not usable, so I have decided to ignore the error. If some guy find a better solution (like mark with warn file which cannot be compiled), any suggestion are welcome! |
Once job https://opensagres.ci.cloudbees.com/job/typescript.java/423/ will be finished, you will able to install 1.4.0-SNAPSHOT https://github.com/angelozerr/typescript.java/wiki/Installation-Update-Site |
Guys, I close this issue, if you have again problem, please reopen the issue or create new one. Thanks! |
@angelozerr Just for curiosity: Does your plugin initiate the compilation for the files received in the compileOnSaveAffectedFileList response? If yes, why can't you filter away the 'index.d.ts' files when initiatiating the compilation? |
Good catch! I have implemented your idea with 566e841 |
Starting from an empty project, I can compile TS code without problem.
As soon as I add types (under node_modules/@types) using npm, I get the following error message when saving a TS file:
Errors occurred during the build.
Errors running builder 'TypeScript Builder' on project 'TypescriptProject'.
Error while compiling with tsserver
java.util.concurrent.ExecutionException: ts.TypeScriptNoContentAvailableException: No content available.
Error while compiling with tsserver
java.util.concurrent.ExecutionException: ts.TypeScriptNoContentAvailableException: No content available.
For info: I have node.js v6.11.0 installed on my Windows computer. The error always occurs on my computer and occasionally occurs on my colleague's machine
TypeScriptNoContentAvailableException.zip
.
The text was updated successfully, but these errors were encountered: