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
}
}