Visual Studio 2017 - Node.JS Server Process - Turn off?
I raised feedback on this issue:
https://developercommunity.visualstudio.com/content/problem/31406/visual-studio-2017-nodejs-server-process-turn-off.html
I got response back from a MS Team - he directed me to this post:
https://developercommunity.visualstudio.com/content/problem/27033/nodejs-server-side-javascript-process-consuming-to.html?childToView=27629#comment-27629
The node.exe process has the command line:
Effectively I was told:
In VS 2017, several features are implemented in JavaScript. Node.js is used by Visual Studio to run that JavaScript. Among other things, Node is used to run the code that provides formatting and intellisense services when a user is editing TypeScript or JavaScript. This is a change from VS 2015.
It answers my question, but brings to light another - why do you need 1.4GB of memory to give me intellisense on JavaScript files ... or is this one of the solutions that has been built into VS so it uses Less Memory so it doesn't hit the 2GB(4GB) limit of 32-bit processes? Questions questions questions.
You have to disable TypeScript support on Visual Studio:
Tools > Extensions and Updates > TypeScript for Microsoft Visual Studio > Disable
After that, just restart Visual Studio, and you are good to go.
Tools > Options > Text Editor > JavaScript/TypeScript > Language Service...
Uncheck 'Enable the new JavaScript language service'.
Restart Visual Studio
This appears to prevent the NodeJS process from starting.
Ryan Ternier's answer pointed me in what I believe is the right direction. Following his link (https://developercommunity.visualstudio.com/content/problem/27033/nodejs-server-side-javascript-process-consuming-to.html?childToView=27629#comment-27629) led me to Bowden Kelly's answer, right beneath the accepted answer.
Here is Bowden Kelly's answer:
The node process you are seeing is powering the JavaScript language service. You will see this process appear anytime you edit a JS file, TS file, or any file with JS/TS inside (html, cshtml, etc). This process is what powers IntelliSense, code navigation, formatting, and other editing features and it does this by analyzing the entire context of your project. If you have a lot of .js files in your project, this can get large, but more than likely the issue is that you have a lot of library files that are being analyzed. By default, we will scan every .js/.ts file in your project. But you can override this behavior and tune the language service to only focus on your code. To do this create a tsconfig.json in your project root with the following settings:
{
"compilerOptions": {
"allowJs": true,
"noEmit": true
},
"exclude": [
"wwwroot/lib" //ignore everything in the lib folder (bootstrap, jquery, etc)
// add any other folders with library code here
],
"typeAcquisition": {
"enable": true,
"include": [
"bootstrap",
"jquery" //list libraries you are using here
]
}
}
Once I added the folder with all my script libraries into the tsconfig.json file, life was good again.