最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - There is no intellisense in vs code node js - Stack Overflow

programmeradmin2浏览0评论

There is no intellisence in visual studio code. i have installed and tried many extensions but it does not helping me out. It only shows those functions and variables that are already used in my code file. Here is the list on extension i have installed and the screenshot.

There is no intellisence in visual studio code. i have installed and tried many extensions but it does not helping me out. It only shows those functions and variables that are already used in my code file. Here is the list on extension i have installed and the screenshot.

Share Improve this question edited Mar 4, 2019 at 23:36 Gama11 34.1k9 gold badges89 silver badges106 bronze badges asked Mar 4, 2019 at 18:58 Usama KhanUsama Khan 2995 silver badges11 bronze badges 5
  • VS code only gives intellisense when the function or class you are using has proper documentation. Like express npm. – Shaharyar Commented Mar 4, 2019 at 19:07
  • I have used express before this but its same. Only those functions and variables are in intellisense after “.” that are already in the code file, then I decided to reinstall vs code and extensions and start new project. – Usama Khan Commented Mar 4, 2019 at 19:13
  • VS Code fetches type-definitons for node and you should be getting intellisense there without any of those extensions. Check your VS Code settings under JavaScript and see if anything is disabled that is related to Suggestions and Intellisense. – cinnaroll45 Commented Mar 4, 2019 at 20:45
  • Also, node should be in your path for JavaScript Language Service to get those definitions. Further reading: code.visualstudio.com/docs/nodejs/working-with-javascript – cinnaroll45 Commented Mar 4, 2019 at 20:51
  • 1 There is no problem with the vs code i just solve this by npm install —save @types/node – Usama Khan Commented Mar 4, 2019 at 21:11
Add a comment  | 

2 Answers 2

Reset to default 15

There is no problem with the vs code i just solve this by

npm install --save @types/node

This is one of development dependencies and —save is just an argument that reflect the info related to this in your package.json file

Use this command in Mac :

sudo npm install -g --save @types/node --unsafe-perm=true --allow-root
发布评论

评论列表(0)

  1. 暂无评论