1

I started to learn Node.js recently, and I've notice a difference between my VScode IDE vs the guides on YouTube or other places VScode IDE

for example I want to write the following code const names = require('./names')

Language mode is set to JavaScript

1. I want the the IDE will complete the code when I write require Like every IDE

no autocomplete

2. after I write it, it's not highlighted like a normal piece of code.

My IDE:

My IDE

Some instructor IDE:

Some instructor IDE

Daniel
  • 41
  • 8
  • You should read [this article](https://www.pluralsight.com/guides/visual-studio-code-for-node.js-development). – Sercan Dec 11 '21 at 14:16
  • @SercanSebetçi This article does not help me at all! – Daniel Dec 11 '21 at 14:31
  • After installing the plugins, you can read [this post](https://stackoverflow.com/questions/29975152/intellisense-not-automatically-working-vscode/29979730#29979730) to get intellisense active. – Sercan Dec 11 '21 at 14:33
  • @SercanSebetçi Sorry, doesn't fix the Autocomplete (Intellisense) and the Highlighting – Daniel Dec 11 '21 at 17:08

1 Answers1

1
  1. Install Node.js Extension Pack in Visual Studio Code Editor.

  2. Then install the Node.js Modules Intellisense plug-in in Visual Studio Code Editor.

The image below belongs to the test study I made after installing the plugins I mentioned above. You can review this article to create the test project.

Application Test Image

Node.JS and NPM must be installed on the system for all the processes I mentioned above to work. To check:

> node --version
v14.17.6
> npm --version
v6.14.15
Sercan
  • 4,739
  • 3
  • 17
  • 36
  • 1
    Thank you, I do have the autocomplate (even if its not accurate) but I still don't have the heighted syntax – Daniel Dec 11 '21 at 20:25