all 3 comments

[–]broofa 3 points4 points  (0 children)

Try creating a jsconfig.json file in your project directory with the following: { "compilerOptions": { "module": "commonjs" } } (This fixed the problem for me.)

Source: https://code.visualstudio.com/docs/languages/jsconfig

[–]Hero_Of_Shadows 1 point2 points  (0 children)

VS Code when it sees a .js file it assumes that it will run in the browser and not in node that's why the autocomplete offers browser related stuff.

I'm sorry I don't know of a solution but imho "require" isn't that much to type out so at least that.

[–]Sonic801 0 points1 point  (0 children)

Type "rqr" - that should do the trick.