Q:

How to display error in Node.js?

I use windows command line for running Node.js files.
When I execute the script window is hidden at once. So I can not see errors.
How to not close window Command line and to display errors?

A:

You have to open a console first and then execute your script from there.

Widows+R > type 'cmd' > OK

And in the console
C:\> cd C:\the\path\to\your\script
C:\> node yourScript.js

The console window will stay open

