Reputation: 41
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
2. after I write it, it's not highlighted like a normal piece of code.
My IDE:
Some instructor IDE:
Upvotes: 1
Views: 3536
Reputation: 5081
Install Node.js Extension Pack in Visual Studio Code Editor.
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.
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
Upvotes: 1