如何在 VS Code 中启用 Node.js Intellisense?
How can I enable a Node.js Intellisense in VS Code?
如何在 VS Code 中启用 Node.js Intellisense?
例如,我知道 Node.js __dirname
中有一个常量,但是当我尝试在 VS Code 中键入 __dir
时,我没有得到任何建议,而我会希望看到 __dirname
作为建议。
我该怎么办?也许我应该安装一个插件?
这是我使用的 VS Code 版本:
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
谢谢。
有一段时间回来了:
npm install node;
在项目根文件夹中足以让 vscode(至少对我而言)给我 node 的智能感知。现在我也需要这样做 :
npm install @types/node;
再次在项目文件夹中。
Also the same solution seems to be suggested from vs code docs.
如何在 VS Code 中启用 Node.js Intellisense?
例如,我知道 Node.js __dirname
中有一个常量,但是当我尝试在 VS Code 中键入 __dir
时,我没有得到任何建议,而我会希望看到 __dirname
作为建议。
我该怎么办?也许我应该安装一个插件?
这是我使用的 VS Code 版本:
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
谢谢。
有一段时间回来了:
npm install node;
在项目根文件夹中足以让 vscode(至少对我而言)给我 node 的智能感知。现在我也需要这样做 :
npm install @types/node;
再次在项目文件夹中。 Also the same solution seems to be suggested from vs code docs.