简体   繁体   中英

How to enable intellisense for nodejs in visual studio 2015?

I have recently installed visual studio 2015.

I have also installed nodejs tools for visual studio 2015 from its official source:

Visual Studio tools for nodejs

Now I am able to create nodejs-express 4 projects inside visual studio 2015. I am able to do npm operations inside my editor too.

But I am not able to make intellisense working.

it does not show code suggestions.

Do I have to enable it manually?

I tried few blogs and tried to edit from :

Tools => Options => Text Editor => NodeJs

but there is no nodejs option to configure.. only javascript is there.

我的编辑器配置的屏幕截图

Also When I run npm install from my IDE , after installing node_modules it shows this message:

Could not find Typings package manager tool used for Intellisense

any inputs?

thanks

We have the same problem with one VS2015 instance. It seems to behavior different from another one, in wich Node.js Tools for Visual Studio works fine. I used a workaround to "turn IntelliSense on" in the machine where VS is showing the message "Could not find Typings package manager tool used for Intellisense".

  1. Closed the solution;

  2. Uninstalled Typings npm local package:

    npm uninstall typings -S (executed from project's folder)

  3. Installed Typings npm as a global package:

    npm install typings -g -S

  4. Installed Typings dictionaries globally:

     typings install dt~node --global --save typings install dt~express dt~serve-static dt~express-serve-static-core --global --save typings install dt~angular --global --save 
  5. Reopened the solution in Visual Studio 2015.

The message "Could not find Typings package manager tool used for Intellisense" still appears when the solution is opened, but IntelliSense is working.

The problem seems to be sensitive to some configuration or software installed in each development machine, but we are not sure until now.

Regards,

我尝试了以下方法并且有效

npm install typings -g -S

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM