Javier Leyva Seiglie
Open command prompt
Terminalif you are using mac).
Type on the command windows
If NodeJS is present in the system, you´ll see something like
v16.51.1 being that the installed version of Node (It could be other version, no worries).
Go to https://nodejs.org
Download the recommended version.
Run the installer.
Accept terms and conditions and next, next, next...
npm init -y.
npm stands for
Node Package Manager
init is the keyword for NodeJs to create a new project.
-y is to pass as a default all values.
package.jsonfile will be created on your project folder.
Right click on the file explorer (where the
package.json is displayed) and select new file.
We are naming it
Remember to take out the "$"
And you´ll see on the terminal the
console.log() message displayed.
Still, I prefer to do it another way, since it allows for a more robust and personalized way to run our
package.json we created with
npm init -y? Well, we are editing now. We will make that, every time we type
npm run start on the Visual Studio terminal, it´ll execute our
package.json to edit it.
Careful! We added a
, at the end of line 7, if the
, is missing, the JSON format is not correct and will throw errors / won´t work.