2

Suddenly I receive this error message:

The JavaScript language service has encountered an error and has been shut down.

There is no intellisense in javascript!

What to do?

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
MIlena
  • 257
  • 1
  • 4
  • 13

6 Answers6

2

error window on opening JS-file

In my case I have:

  1. Latest VS 2013 Upd.3
  2. Latest Web Essential 2013
  3. Latest ReSharper 8.2.1

Sometimes I see this errors on opening first JS-file after running the solution. I have spent about 2 days on it. Removing Web Essentials helps (also clean the AppData\Local\Microsoft\VisualStudio\12.0\Extensions folder:

  1. extensions.en-US.cache
  2. extensionSdks.en-US.cache
  3. "WebEssentials" folder - it will contain file WebEssentials2013.pkgdef

Then I have tried reset all VS settings and it helped. For a month) Today I have updated solution from the GIT via VS Git Tools (commit contained a lot of JS and CSS changes) and have seen it AGAIN!!!

New solution steps:

  1. Export VS settings.
  2. Reset VS settings
  3. Restart VS.
  4. Check if now it has no any errors.
  5. Import all VS settings EXCEPT Options => TextEditor.
  6. Turn on line numbers for all languages (and if you have some other custom settings - them too)

I don't know who is to blame but I have the fresh Windows 8.1 + fresh VS 2013.

The newest solution steps:

  1. Open the CurrentSettings.vssettings file.
  2. Remove

C:\Users\USERNAME\JsDocComments.js|C:\Users\USERNAME\Modern.Intellisense.js

string from the file

The latest solution steps:

Since I have the laptop with the new clean system w\o this issue I have done the following:

  1. Backed up the PC level ReSharper settings and reset all of them
  2. Reset VS settings with export current one
  3. Restored the PC level ReSharpe settings
  4. Restored the VS exported settings except Options => TextEditor => JS and JS Specific

I have restarted the VS several times and don't see the error now.

SerjG
  • 3,325
  • 3
  • 30
  • 30
  • Actually I have tested and it's enough to exclude the TextEditor.JavaScript and TextEditor.JavaScript Specific ticks. – SerjG Sep 17 '14 at 18:33
  • Be careful not to clean out the ENTIRE `AppData\Local\Microsoft\VisualStudio\12.0\Extensions` folder! The Answer could probably be modified to make this clearer.. – Brian Lacy Jan 23 '15 at 23:13
  • Your section labeled **New solution steps** (exporting settings, resetting, and importing all but the 2 `TextEditor.Javascript` settings) finally worked for me in VS 2013. Nothing else did; I even tried your **The newest solution steps** first, but I didn't have the `Modern.Intellisense` item. Thanks for the help! – Brian Lacy Jan 23 '15 at 23:28
  • @BrianLacy it's a strange. If you have WE installed you should have these paths. Try to go to the User folder and check if you have files there. Also I want to make you know that I have installed the same configuration (Resharper 9 + WE 2013) to the laptop from the scratch with the default options and have no such error anymore. On my PC I still have it and going to review the Resharper setting or something else to find the source – SerjG Jan 25 '15 at 07:32
1

Try this solution:

"I was able to fix it: Uninstalling Snippet Designer and deleting the Code Snippets folder on C:\Users\USER\Documents\Visual Studio 2012"

Taken from:

http://social.msdn.microsoft.com/Forums/windowsapps/en-US/d62506a1-4f5f-4013-bcaa-0f827325e424/javascript-language-service-has-encountered-an-error-and-has-been-shut-down

ᗩИᎠЯƎᗩ
  • 2,122
  • 5
  • 29
  • 41
  • Thanx for your response but how to uninstall snipped designer? There is no such a program in control panel. Where is it? – MIlena Jul 31 '13 at 08:28
  • You could try to google for tips. I've found this: http://www.uninstallapp.com/article/How-to-uninstall-Snippet-Designer-1.4.0.html – ᗩИᎠЯƎᗩ Jul 31 '13 at 08:32
  • I had a similar error, and I also had "Snippet Designer" extension. Error went away after I uninstalled this. – Quango Aug 03 '13 at 11:47
  • I'm getting this error regularly every time I open a project in VS 2013, and I don't have Snippet Designer installed. – Brian Lacy Jan 23 '15 at 23:01
1

I got this after accidentally copy-pasting a large chunk of HTML into a JavaScript file. Removing said HTML & restarting VS resolved the problem.

lgaud
  • 2,430
  • 20
  • 30
  • Same for me, I removed js files in chunks until the problem went away and narrowed it to one file that had HTML in it. – wlf Nov 17 '17 at 11:58
0

In my case, I have Visual Studio 2013 and a Node.js project which is weirdly set up. I just created an empty one and then copied angular-seed into it. So things are not as expected by VS, I guess. I was getting the same error as in the question.

I did not want to uninstal the snippet designer, so I did two things:

  1. I made sure all the snippets in JavaScript folder had shortcuts defined (manually modified xml files) (it was mentioned on the same page Andrea provided link for) - this alone did not help.
  2. I noticed that JavaScript Language Service output widow had a message in it complaining about missing _references.js file. I added the file manually and added only one line to it:

    /// <autosync enabled="false" />

Visual Studio stopped complaining about the service failing then. I don't know if fix 2 alone does solve the issue.

ps: I decided to add this info here because this question comes first on Google search for the error. I know it is an old one...

user25398
  • 101
  • 5
0

I encountered this issue when I opened a solitary html file.

My workaround is to first open a Solution that contains a web project and then to open a JS file within it. After this, my solitary html file opens without error.

Tahir Hassan
  • 5,715
  • 6
  • 45
  • 65
0

Remove Developer Assistant extension. Work for me

Edgar O
  • 335
  • 3
  • 3