aaa bbb
aaa bbb

Reputation: 11

WebStorm autocomplete for npm modues

I recently started following a course about Node.js. I have an issue in WebStorm. I am trying to explore the validator module. The autocomplete in WebStorm doesn't give me choices for methods unless I select the default in the drop-down list which is unusual across all programming languages including JS !!! is it an issue and if yes what is the solution?

Ws-image 1

enter image description here

Upvotes: 0

Views: 78

Answers (1)

lena
lena

Reputation: 93868

The problems occur because of the weird way properties are defined. Normally installing Typescript stubs can be used as a workaround. But this doesn't work for validator due to WEB-43528. Please follow this ticket for updates

Using import validator from "./validator"; instead of require() can be used as a workaround

Upvotes: 1

Related Questions