Log Error Line Node.js

const err = new Error('The message');
console.error(err.message);
Undefined