Sergei Bynas
Sergei Bynas

Reputation: 71

VSCode does not autocomplete Node.JS modules

That's how it works with default js methods, IntelliSense seems to understand and autocomplete this
enter image description here




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? enter image description here

Upvotes: 5

Views: 5772

Answers (1)

Ben Butterworth
Ben Butterworth

Reputation: 28532

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

Upvotes: 6

Related Questions