I have installed Visual Studio Code and Node.js and both basically work, but autocomplete is not (completely) working. If I type 'console.' I do indeed see a list popup. Likewise if I do: const http = require("http"); http.
But if I simply type 'process.' I don't see anything. In fact as soon as I type '.' Code autocompletes 'process' to 'ProcessingInstruction'. I was expecting to see argv pop up, along with all the other stuff you see if you type 'process' at a Node prompt.
Here's what I see when I type 'console.': Yay -- it works!
But here's what I see when I type 'process.' (I have to change the autocompleted 'ProcessingInstruction' back to 'process'): Boo -- it doesn't know 'process'! :(
package.json
file at the root of your workspace? – Amicableprocess
is NodeJS-specific, so VS Code will need to know that you are working with Nodejs. Runningnpm init
will likely do the trick. This will also create thepackage.json
file mentioned by @MattBierner – Cummingsnpm install --save-dev @types/node
as well. See my newly added answer below. – Cummings