Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I enable a Node.js Intellisense in VS Code?

How can I enable a Node.js Intellisense in VS Code?

For instance, I am aware of a constant in Node.js __dirname, but when I try to type __dir in VS Code I am not getting any suggestions, while I would expect to see the __dirname as a suggestion.

enter image description here

What can I do about it? Maybe I should install a plugin?

Here is the version of VS Code I am using:

Version: 1.33.1 (user setup)
Commit: 51b0b28134d51361cf996d2f0a1c698247aeabd8
Date: 2019-04-11T08:27:14.102Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17763

Thank you.

like image 991
qqqqqqq Avatar asked Apr 25 '19 19:04

qqqqqqq


People also ask

How do I get IntelliSense code for Visual Studio node JS?

One of the biggest advantages of using Visual Studio Code with node. js has to be Intellisense. If you want to see the available suggestions at any time, simply use the keyboard shortcut Ctrl-Space.

How do I activate VS Code IntelliSense?

You can trigger IntelliSense in any editor window by typing Ctrl+Space or by typing a trigger character (such as the dot character (.) in JavaScript).

How do I turn on VS in IntelliSense?

You can enable or disable particular IntelliSense features in the Options dialog box, under Text Editor > C/C++ > Advanced.

Why is IntelliSense not working in VS Code?

If IntelliSense is not working as it should on your Windows 11/10 PC, you can try restarting VS Code and this should solve the issue. Restarting the program can be really effective and time saving in some cases. If the issue persists, you can try restarting your computer altogether.


1 Answers

There was some time while a back that :

npm install node;

in the project root folder was enough for vscode (at least for my case) to give me intellisense for node . Now I need to do also that :

npm install @types/node;

again in the project folder . Also the same solution seems to be suggested from vs code docs .

like image 197
liaguridio Avatar answered Oct 05 '22 17:10

liaguridio