admin管理员组文章数量:1335659
That's how it works with default js methods, IntelliSense seems to understand and autoplete this
And when I'm trying to import some node default modules (path,fs,http) This highlighting does not show methods of these objects, how can I fix this?
That's how it works with default js methods, IntelliSense seems to understand and autoplete this
And when I'm trying to import some node default modules (path,fs,http) This highlighting does not show methods of these objects, how can I fix this?
Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked Jan 8, 2018 at 12:38 Sergei BynasSergei Bynas 711 silver badge4 bronze badges 4-
Probably not of any help, but on my machine the snippet from your last screenshot just works and gives me intellisense for the
path
namespace... – user3297291 Commented Jan 8, 2018 at 12:44 - Please mention vs code version – Manjeet Singh Commented Jan 8, 2018 at 13:12
-
did you install the packages ? make sure
node_modules
exist, runnpm install
– I Putu Yoga Permana Commented Jan 9, 2018 at 9:06 - Do you have node and npm installed? VS Code uses npm to automatically download the types that power intellisense. See this section of the docs for mode info – Matt Bierner Commented Jul 6, 2018 at 6:57
1 Answer
Reset to default 6If you have tsconfig.json
for some reason, add enableAutoDiscovery
to true, as it default to false if that file exists.
// tsconfig.json
{
...
"typingOptions": {
"enableAutoDiscovery": true
}
}
本文标签: javascriptVSCode does not autocomplete NodeJS modulesStack Overflow
版权声明:本文标题:javascript - VSCode does not autocomplete Node.JS modules - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742390424a2465879.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论