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.
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.
There was some time while 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 the following:
npm install @types/node
again in the project folder. Also the same solution seems to be suggested from vs code docs .