Javatpoint Logo
Javatpoint Logo

Node.js Errors

The Node.js applications generally face four types of errors:

  • Standard JavaScript errors i.e. <EvalError>, <SyntaxError>, <RangeError>, <ReferenceError>, <TypeError>, <URIError> etc.
  • System errors
  • User-specified errors
  • Assertion errors

Node.js Errors Example 1

Let's take an example to deploy standard JavaScript error - ReferenceError.

File: error_example1.js

Open Node.js command prompt and run the following code:

Node.js error example 1

Node.js Errors Example 2

File: timer2.js

Open Node.js command prompt and run the following code:

Node.js error example 2
Next TopicNode.js DNS




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA