Skip to content

The Typescript language service died unexpectedly 5 times in the last 5 Minutes #6726

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
khanyuriy opened this issue Jan 29, 2016 · 14 comments
Closed
Labels
Question An issue which isn't directly actionable in code

Comments

@khanyuriy
Copy link

Hi, something is killing this service, after upgrading node to 5.5.
I have got this message "The Typescript language service died unexpectedly 5 times in the last 5 Minutes. Please consider to open a bug report"
Any suggest ?

@RyanCavanaugh
Copy link
Member

Can you post a file that causes this problem?

@mhegazy mhegazy changed the title The death of Typescript language service after node js update from 0.12 to 5.5 The Typescript language service died unexpectedly 5 times in the last 5 Minutes Jan 29, 2016
@khanyuriy
Copy link
Author

Hi, RyanCavanaugh!
Do you ask me to send any file of my project ?
It doesn't work in every file of my code base.
I have created clean project with one ts file and service works.
Is there some diagnostic tool or may be dump files to get the cause of service crash in my code?
It is strange, because before installation of jest module, and therefore node 5.5, it worked. With some delay on file open but worked.

@mhegazy
Copy link
Contributor

mhegazy commented Jan 31, 2016

@khanyuriy we need some repro steps to be able to diagnose the issue. What version of vscode are u using? What version of TS? Do you have a custom tssdk? What are your compiler options? Can you build this project on the commandline? Does it reproduce on any file outside ur project?

@khanyuriy
Copy link
Author

hi, mhegazy!

What version of vscode are u using?

Version 0.10.6
Commit a80232bbcfe8a5cdad1ebc98638673d9dcb02458
Date 2015-12-19T11:34:58.895Z
Shell 0.34.5
Renderer 45.0.2454.85
Node 4.1.1

What version of TS

Version 1.0.3.0

Do you have a custom tssdk

no, i haven't

What are your compiler options?

{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"sourceMap": true
}
}

Can you build this project on the commandline

yes, i build it with gulp-tsc

Does it reproduce on any file outside ur project

yes i have all js file compiled successfully

@mhegazy
Copy link
Contributor

mhegazy commented Feb 1, 2016

can you share a project that reproduces the issue. i can not get it to reproduce with the information supplied.

@khanyuriy
Copy link
Author

mhegazy,
i guess i found the cause. I think it tries to parse node_modules that resides in root dir. Structure of node_modules is changed since node 0.10, thats is why it was dead after node upgrade. When i removed this folder service is worked like a charm.
is there anyway to tell vscode to ignore this folder?

@billti
Copy link
Member

billti commented Feb 3, 2016

Add "node_modules" to the "excludes" option (see https://github.com/billti/ng2demo/blob/master/tsconfig.json#L10 as an example).

@khanyuriy
Copy link
Author

hi, billti!
thank you. It was helpfull

@mhegazy
Copy link
Contributor

mhegazy commented Feb 4, 2016

#6670 should add node_modules to the excludes by default, so should handle this issue.

@mhegazy mhegazy added the Question An issue which isn't directly actionable in code label Feb 4, 2016
@mhegazy mhegazy closed this as completed Feb 4, 2016
@Alphapage
Copy link

Hello,

I have the same error message from vscode, but I know where my problem comes from:
I'm using Virtualbox with Windows 10 as host and guest. From guest, if I open the project from C:, then no problem. But if I open the project from shared folder drive, then I get the same error message:
"The Typescript language service died unexpectedly 5 times in the last 5 Minutes. Please consider to open a bug report".
The problem seems to come from the file watchers which are unable to start or to detect changing.
Virtualbox team doesn't seem to want to implement some notifications for shared folders.

Do you have a workaround to make tsserver working with virtualbox shared folders (something like polling maybe) ?

Thank you in advance for your answers.

@mhegazy
Copy link
Contributor

mhegazy commented Mar 5, 2016

@zhengbli, any ideas here?

@zhengbli
Copy link
Contributor

zhengbli commented Mar 6, 2016

It seems that virtualbox shared folder didn't implement the underlying file change notification mechanism that the non-polling fs.watch depends on (related: https://www.virtualbox.org/ticket/10660, hashicorp/vagrant#707, though the guest in these examples are not windows, but I suspect the same issue exists). We do need a way to detect the failure, or just detect network file system, and switch to polling watchers in this case. I'll do some research on this.

@billti
Copy link
Member

billti commented Mar 7, 2016

@zhengbli Can you open a new issue to track this and assign to yourself (if you haven't already). thanks.

@zhengbli
Copy link
Contributor

zhengbli commented Mar 7, 2016

FYI: I repro this issue with the same set up, and running tsc --watch gives me an error message saying:

UNC Paths are not supported. Defaulting to Windows directory.

Calling fs.watch directly on shared folder caused exit without information; while calling fs.watchFile works fine.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Question An issue which isn't directly actionable in code
Projects
None yet
Development

No branches or pull requests

6 participants