Increasing the stack frames in error output:

node --stack-trace-limit=200 <name of file>.js