Skip to content
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

TypeScript language service crashes on projects on a mounted SharePoint WebDav folder #3860

Closed
jandersonfcosta opened this issue Mar 8, 2016 · 20 comments
Assignees
Labels
javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@jandersonfcosta
Copy link

After update VSC to 0.10.10, javascript intellisense stop working.

VSC show warn message: "The Typescript language service died unexpectedly 5 times in the last 5 Minutes. Please consider to open a bug report."

Any idea?
Thank you!

@egamma egamma self-assigned this Mar 8, 2016
@egamma egamma added javascript JavaScript support issues info-needed Issue requires more information from poster labels Mar 8, 2016
@egamma
Copy link
Member

egamma commented Mar 8, 2016

Can you provide some more information about your project setup, what kind of project? What is your jsconfig.json? What libraries are you using.

@jandersonfcosta
Copy link
Author

Hi egamma,
The project folder containing the js files are in the SharePoint database.
SharePoint is installed on my test server.
I open project files via SharePoint WEBDAV protocol in VSC.

Note: For css, js and html files, intellisense is working normal.

So intellisense is lost.

Before it worked.

@egamma
Copy link
Member

egamma commented Mar 8, 2016

I suspect you run out of memory because you do not exclude some of the folders in the project in the jsconfig.json.

Therefore Does your project include a jsconfig.json? If yes, can you include it?

If it doesn't have a jsconfig.json, can you create one following the migration guide:
https://code.visualstudio.com/Updates#_languages-javascript section Migration guide.

In the past Code excluded some folders automatically, this is not done automatically anymore and you need to define the exclude folders in the jsconfig.json.

@jandersonfcosta
Copy link
Author

My project not include a jsconfig.json
I do not know what the role of js config.json..

Note: For css, json and html files, intellisense is working normal.
Intellisense not work only for js files.

@egamma
Copy link
Member

egamma commented Mar 8, 2016

JavaScript is more complex than css, html, and json, therefore a complex project needs a jsconfig.json. In the past we have automatically excluded some folders from being analyzed we no longer do this and for this reason you now need a jsconfig.json file.

I do not know what the role of js config.json.

jsconfig.json is documented here https://code.visualstudio.com/docs/languages/javascript#_javascript-projects-jsconfigjson

@jandersonfcosta
Copy link
Author

Did not work

@egamma
Copy link
Member

egamma commented Mar 9, 2016

Can you pls sketch the folder structure (as is done here #3791 (comment)) of your project and include the jsconfig.json you are using? Without some more information we cannot track this down.

@lukkarip
Copy link

The workflow to work with SharePoint Javascript, CSS, MasterPage, PageLayouts etc. is to map folder [site]/_catalogs/masterpage and work with this mapped folder. The problem is that by default you can't include json files (http://sharepoint.stackexchange.com/questions/114540/why-is-upload-of-json-files-prohibited) :)

So way to work with Visual Studio Code is to reference Typescript definitions by adding references to code pages "manually". So, after Visual Studio Code 0.10.10 update, opening any javascript file now gives error "The Typescript language service died unexpectedly 5 times in the last 5 Minutes. Please consider to open a bug report." again and again.

@egamma
Copy link
Member

egamma commented Mar 10, 2016

@lukkarip thanks for explaining the workflow and setup.

I assume this is a larger folder with many JS files? Previously, the JavaScript infrastructure has excluded some well known folders: node_modules, bower_components, jspm_packages, tmp, and temp. So if these folders have many JS files and you cannot exclude them then this can explain the crash.

Can you confirm that this is the case. I'm sorry that adding a jsconfig.json is not a solution for your setup.

@lukkarip
Copy link

I made a quick test to demonstrate the problem. I created just one javascript file, which contains no reference to anything, just couple of lines some javascript. I put this one file in "testing" folder under [site]/_catalogs/masterpage. This is done by mapping network drive (WebDAV). This is SharePoint 2013.

In Visual Studio Code (0.10.10) I select only to open this "testing" folder with one js file. When opened Visual Studio Code starts to give warning "The Typescript language service died unexpectedly 5 times in the last 5 Minutes. Please consider to open a bug report." again and again.

So in practise, Visual Studio Code cannot be used with SharePoint 2013 at the moment. Needed to change to SublimeText for now. Hope some fix is goming soon.

I have admin rights so seems that I was able to .json-format from "not allowed files" in SharePoint Central Admin. With this change. I can in fact add json-file. The problem is in this my test case there seems to be anything that could be excluded(?)

@egamma
Copy link
Member

egamma commented Mar 10, 2016

Can you reproduce this when you work on a local folder with the same file?

@egamma
Copy link
Member

egamma commented Mar 10, 2016

Can you share this one js file?

@lukkarip
Copy link

Same "testing"-folder with this one file works fine locally. The problem is only if opened in SharePoint 2013 mapped folder. Test file is really uninteresting random javascript, but here it is: https://github.com/lukkarip/Tests/blob/master/testing/session-handler.js

@egamma egamma changed the title javascript intellisense not working after update VSC 0.10.10 TypeScript language service crashes on projects on a mounted SharePoint WebDav folder Mar 10, 2016
@egamma egamma removed the info-needed Issue requires more information from poster label Mar 10, 2016
@egamma egamma assigned bpasero and unassigned egamma Mar 10, 2016
@egamma
Copy link
Member

egamma commented Mar 10, 2016

@bpasero can you please add your insights on the node issue that causes this and then move it to the TypeScript repository.

@bpasero bpasero assigned egamma and unassigned bpasero Mar 10, 2016
@bpasero
Copy link
Member

bpasero commented Mar 10, 2016

The node issue is: nodejs/node#4002

@egamma I am not sure how to move the issue, so I give it back to you to decide if this one should stay open as tracking bug or not.

@bpasero
Copy link
Member

bpasero commented Mar 10, 2016

@egamma egamma removed the javascript JavaScript support issues label Mar 10, 2016
@egamma
Copy link
Member

egamma commented Mar 10, 2016

@bpasero thanks.

This is a regression for SharePoint users using code. The previous JS implementation profited from the fix described above. Therefore suggest to consider it for TS 1.8.9 if possible.

@egamma
Copy link
Member

egamma commented Mar 10, 2016

This issue was moved to microsoft/TypeScript#7469

@egamma egamma closed this as completed Mar 10, 2016
@egamma
Copy link
Member

egamma commented Mar 10, 2016

Reopening as a tracking bug

@egamma egamma reopened this Mar 10, 2016
@egamma egamma added javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Mar 10, 2016
@egamma
Copy link
Member

egamma commented Aug 9, 2016

The typescript bug has been closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants